国际化工具类异常处理优化

yun-zuoyi
汪云昊 5 years ago
parent 100d8b0019
commit baaf16ad56

@ -867,4 +867,53 @@ public class BlockSoftSwitchEnumUtil {
return null;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum REF_DATA_TYPE {
SUIT_MESSAGE(10, "适配信息"),
REQUEST_ORGIN_PARAM(20, "请求原始参数"),
ORIGINAL_MESSAGE(30, "原始报文"),
CONVERTED_MESSAGE(40, "转换报文");
private int value;
private String description;
private REF_DATA_TYPE (int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
public static REF_DATA_TYPE valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
return values()[i];
}
}
return null;
}
}
}

@ -0,0 +1,47 @@
package cn.estsh.i3plus.pojo.softswitch.bean;
import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.enumutil.BlockSoftSwitchEnumUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.Table;
/**
* @Description :
* @Reference :
* @Author : yunhao
* @CreateDate : 2020-04-15 16:56
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "BS_LONG_DATA")
@Api(value = "长数据", description = "长数据")
public class BsLongData extends BaseBean {
@Column(name = "REF_ID")
@ApiParam(value = "关联id")
private Long refId;
@Column(name = "REF_DATA_TYPE")
@ApiParam(value = "数据类型")
@AnnoOutputColumn(refClass = BlockSoftSwitchEnumUtil.REF_DATA_TYPE.class)
private Integer refDataType;
@Lob
@Column(name = "DATA")
@ApiParam(value = "数据")
private String data;
}

@ -69,13 +69,11 @@ public class BsSuitDataDetail extends BaseBean {
private String getDateTime;
// 移动至记录数据表
@Lob
@Column(name = "ORGIN_DATA")
@ApiParam(value = "原始报文数据")
private String orginData;
// 移动至记录数据表
@Lob
@Column(name = "TRANS_DATA")
@ApiParam(value = "转换后的报文数据")
private String transData;

@ -90,7 +90,6 @@ public class BsSuitRecord extends BaseBean {
@ApiParam(value = "认证结果")
private Integer suitSslKeyResult;
// 移动至记录数据表
@Column(name = "SUIT_SSL_KEY_RESULT_MESSAGE")
@ApiParam(value = "认证信息")
private String suitSslKeyResultMessage;
@ -113,9 +112,8 @@ public class BsSuitRecord extends BaseBean {
private Long executeTime;
// 移动至记录数据表
@Lob
@Column(name = "SUIT_MESSAGE")
@ApiParam(value = "适配信息")
@ApiParam(value = "适配信息 longDataId")
private String suitMessage;
@Column(name = "PROCESS_STATE")

@ -0,0 +1,16 @@
package cn.estsh.i3plus.pojo.softswitch.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.softswitch.bean.BsLongData;
import org.springframework.stereotype.Repository;
/**
* @Description :
* @Reference :
* @Author : yunhao
* @CreateDate : 2020-04-15 17:15
* @Modify:
**/
@Repository
public interface BsLongDataRepository extends BaseRepository<BsLongData,Long> {
}

@ -327,8 +327,8 @@ public class SoftSwitchHqlPack {
DdlPreparedPack.getNumEqualPack(bsSuitRecord.getCaseTypeId(),"caseTypeId",ddlPackBean);
DdlPreparedPack.getNumEqualPack(bsSuitRecord.getSuitResult(),"suitResult",ddlPackBean);
DdlPreparedPack.getNumEqualPack(bsSuitRecord.getProcessState(), "processState", ddlPackBean);
DdlPreparedPack.timeBuilder(bsSuitRecord.getCreateDatetime(), "createDatetime", ddlPackBean, false, true);
DdlPreparedPack.timeBuilder(bsSuitRecord.getSuitStartTime(), "suitStartTime", ddlPackBean, false, true);
DdlPreparedPack.timeBuilder(bsSuitRecord.getCreateDatetime(), "createDatetime", ddlPackBean, false, true);
ddlPackBean.setOrderByStr(bsSuitRecord.orderBy());
@ -349,12 +349,27 @@ public class SoftSwitchHqlPack {
DdlPreparedPack.getNumEqualPack(bsSuitDataDetail.getProcessState(),"processState",ddlPackBean);
DdlPreparedPack.timeBuilder(bsSuitDataDetail.getGetDateTime(), "getDateTime", ddlPackBean, false, true);
DdlPreparedPack.timeBuilder(bsSuitDataDetail.getProcessTime(), "processTime", ddlPackBean, false, true);
DdlPreparedPack.timeBuilder(bsSuitDataDetail.getCreateDatetime(), "createDatetime", ddlPackBean, false, true);
ddlPackBean.setOrderByStr(bsSuitDataDetail.orderBy());
return ddlPackBean;
}
/**
*
* @return
*/
public static DdlPackBean packHqlBsSuitRequestRecord(BsSuitRequestRecord bsSuitRequestRecord){
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(bsSuitRequestRecord);
DdlPreparedPack.getNumEqualPack(bsSuitRequestRecord.getSuitCaseId(),"suitCaseId",ddlPackBean);
DdlPreparedPack.timeBuilder(bsSuitRequestRecord.getCreateDatetime(), "createDatetime", ddlPackBean, false, true);
return ddlPackBean;
}
/**
*
* @param bsSuitFile

Loading…
Cancel
Save