bug解决

yun-zuoyi
yunhao.wang 6 years ago
parent d30a3685d1
commit 609c1557d3

@ -835,26 +835,26 @@ public class ImppEnumUtil {
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SYS_CONFIG_VALUE_TYPE { public enum SYS_CONFIG_VALUE_TYPE {
STRING(1,"text","文本值"), STRING("1","text","文本值"),
NUMBER(2,"number","数字值"), NUMBER("2","number","数字值"),
DATE(3,"date","时间值"), DATE("3","date","时间值"),
BOOLEAN(4,"switch","布尔值"), BOOLEAN("4","switch","布尔值"),
SELECT(5,"select","多选值"); SELECT("5","select","多选值");
private int value; private String value;
private String name; private String name;
private String description; private String description;
SYS_CONFIG_VALUE_TYPE() { SYS_CONFIG_VALUE_TYPE() {
} }
SYS_CONFIG_VALUE_TYPE(int value, String name, String description) { SYS_CONFIG_VALUE_TYPE(String value, String name, String description) {
this.value = value; this.value = value;
this.name = name; this.name = name;
this.description = description; this.description = description;
} }
public int getValue() { public String getValue() {
return value; return value;
} }
@ -869,7 +869,7 @@ public class ImppEnumUtil {
public static String valueOfCode(int val) { public static String valueOfCode(int val) {
String tmp = null; String tmp = null;
for (int i = 0; i < values().length; i++) { for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) { if (values()[i].value.equals(val)) {
tmp = values()[i].name; tmp = values()[i].name;
} }
} }
@ -879,7 +879,7 @@ public class ImppEnumUtil {
public static String valueOfDescription(int val) { public static String valueOfDescription(int val) {
String tmp = null; String tmp = null;
for (int i = 0; i < values().length; i++) { for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) { if (values()[i].value.equals(val)) {
tmp = values()[i].description; tmp = values()[i].description;
} }
} }

Loading…
Cancel
Save