服务端调整

yun-zuoyi
汪云昊 6 years ago
parent 81128be4e7
commit 0b8bc114bc

@ -237,7 +237,7 @@ public class BlockSoftSwitchEnumUtil {
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum VERIFICATION_METHOD{
LOGIN(1,"登录");
IMPP_LOGIN(1,"IMPP登录");
private int value;
private String description;
@ -264,6 +264,16 @@ public class BlockSoftSwitchEnumUtil {
}
return tmp;
}
public static VERIFICATION_METHOD valueOf(int val) {
VERIFICATION_METHOD tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i];
}
}
return tmp;
}
}
/**
@ -589,4 +599,40 @@ public class BlockSoftSwitchEnumUtil {
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum REQUEST_METHOD{
GET(1,"GET"),
POST(2,"POST"),
PUT(3,"PUT"),
DELETE(4,"DELETE");
private int value;
private String description;
REQUEST_METHOD(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;
}
}
}

@ -997,6 +997,16 @@ public class CommonEnumUtil {
}
return tmp;
}
public static HTTP_METHOD_TYPE valueOf(int val) {
HTTP_METHOD_TYPE tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i];
}
}
return tmp;
}
}
/**

@ -1,10 +1,7 @@
package cn.estsh.i3plus.pojo.model.softswitch;
import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.softswitch.bean.BsSocketSuitCase;
import cn.estsh.i3plus.pojo.softswitch.bean.BsSuitCase;
import cn.estsh.i3plus.pojo.softswitch.bean.BsSuitCaseDataSource;
import cn.estsh.i3plus.pojo.softswitch.bean.BsSuitCaseWebService;
import cn.estsh.i3plus.pojo.softswitch.bean.*;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -35,6 +32,9 @@ public class BsSuitCaseModel implements Serializable {
@ApiParam(value = "Web Service 适配套件")
private BsSuitCaseWebService webService;
@ApiParam(value = "REST 适配套件")
private BsSuitCaseREST bsSuitCaseREST;
@ApiParam(value = "分页数据")
private Pager pager;

@ -1,6 +1,9 @@
package cn.estsh.i3plus.pojo.model.softswitch;
import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
import cn.estsh.i3plus.pojo.softswitch.bean.BsSuitRecord;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -19,10 +22,11 @@ import java.util.Map;
public class SuitServerModel {
// 执行方法命令
@ApiParam(value = "适配命令(枚举)")
private Integer actionId;
@ApiParam(value = "适配器code")
private String suitCaseCode;
/* 认证使用 以后使用 */
private String token;
// 传输单对象
private Object obj;
// 传输集合
@ -35,10 +39,52 @@ public class SuitServerModel {
/**
*
*/
@XStreamImplicit
private String suitMessage;
/**
*
*/
private String suitCaseStatusCode;
@XStreamImplicit
private String suitCaseStatusCode = ResourceEnumUtil.MESSAGE.SUCCESS.getCode();
/**
*
*/
@XStreamImplicit
private boolean suitSuccess = true;
/**
*
*/
@XStreamImplicit
private BsSuitRecord bsSuitRecord;
/**
*
*/
@XStreamImplicit
private BsSuitCaseModel bsSuitCaseModel;
/**
*
*/
@XStreamImplicit
private Integer requestSource;
/**
*
*/
@XStreamImplicit
private Integer suitMethodId;
public int getSuitMethodIdVal(){
if(suitMethodId == null){
return -1;
}
return suitMethodId.intValue();
}
@XStreamImplicit
private String analyzeMessage;
}

@ -44,6 +44,11 @@ public class BsSslKey extends BaseBean {
@ApiParam(value = "认证url")
private String verificationUrl;
//CommonEnumUtil.HTTP_METHOD_TYPE
@Column(name = "REQUEST_METHOD_ID")
@ApiParam(value = "请求方式id")
private Integer requestMethodId;
@Column(name = "KEY_TYPE_ID")
@ApiParam(value = "证书类型枚举")
private Integer keyTypeId;

@ -58,7 +58,7 @@ public class BsSuitCase extends BaseBean {
private Long suitTypeId;
public long getSuitTypeIdVal(){
if(suitTypeId != null){
if(suitTypeId == null){
return -1;
}
return suitTypeId.longValue();

@ -13,6 +13,7 @@ import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;
/**
* @Description :

@ -0,0 +1,48 @@
package cn.estsh.i3plus.pojo.softswitch.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
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.Table;
import javax.persistence.Transient;
import java.util.List;
/**
* @Description :
* @Reference :
* @Author : yunhao
* @CreateDate : 2019-09-18 16:53
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "BS_SUIT_CASE_REST")
@Api(value = "适配器出入参", description = "适配器出入参")
public class BsSuitCaseREST extends BaseBean {
@Column(name = "SUIT_CASE_ID")
@ApiParam(value = "套件id")
@JsonSerialize(using = ToStringSerializer.class)
private Long suitCaseId;
//CommonEnumUtil.HTTP_METHOD_TYPE
@Column(name = "REQUEST_METHOD_ID")
@ApiParam(value = "请求方式id")
private Integer requestMethodId;
@Transient
@ApiParam(value = "请求头转换")
private List<BsSuitCaseParam> requestHeaderList;
}
Loading…
Cancel
Save