软适配功能配置优化

yun-zuoyi
wei.peng 6 years ago
parent 21241e45ca
commit 71798e9f51

@ -379,8 +379,8 @@ public class BlockSoftSwitchEnumUtil {
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SUIT_MODE{ public enum SUIT_MODE{
ACTIVE(1,"客户端"), CLIENT(1,"客户端"),
PASSIVE(2,"服务端"); SERVER(2,"服务端");
private int value; private int value;
private String description; private String description;
@ -484,17 +484,19 @@ public class BlockSoftSwitchEnumUtil {
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SUIT_SERVER_WEB_SERVICE{ public enum SUIT_SERVER_WEB_SERVICE{
ACTIVE(40002,"serverWebServiceHello","hello"), SCHEDULE(40001,"serverWebServiceSendEmail","邮件测试",SUIT_MODE.SERVER),
SCHEDULE(40004,"serverWebServiceSendEmail","邮件测试"); ACTIVE(40002,"softswitchClient","软适配服务邮件服务",SUIT_MODE.CLIENT);
private int value; private int value;
private String description; private String description;
private String clazzName; private String clazzName;
private SUIT_MODE mode;
SUIT_SERVER_WEB_SERVICE(int value, String clazzName,String description) { SUIT_SERVER_WEB_SERVICE(int value, String clazzName,String description,SUIT_MODE mode) {
this.value = value; this.value = value;
this.clazzName = clazzName; this.clazzName = clazzName;
this.description = description; this.description = description;
this.mode = mode;
} }
public int getValue() { public int getValue() {
@ -505,40 +507,12 @@ public class BlockSoftSwitchEnumUtil {
return description; return description;
} }
public static String valueOfDescription(int val) { public String getClazzName() {
String tmp = null; return clazzName;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
* WebService Server
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SUIT_SERVER_WEB_CLIENT{
ACTIVE(40001,"softswitchClient","软适配服务邮件服务");
private int value;
private String description;
private String clazzName;
SUIT_SERVER_WEB_CLIENT(int value, String clazzName,String description) {
this.value = value;
this.clazzName = clazzName;
this.description = description;
} }
public int getValue() { public SUIT_MODE getMode() {
return value; return mode;
}
public String getDescription() {
return description;
} }
public static String valueOfDescription(int val) { public static String valueOfDescription(int val) {
@ -552,4 +526,5 @@ public class BlockSoftSwitchEnumUtil {
} }
} }
} }

Loading…
Cancel
Save