|
|
|
@@ -22,6 +22,12 @@ public enum EnumBusiness { |
|
|
|
BUSINESS_ID10(10, "家居") |
|
|
|
|
|
|
|
; |
|
|
|
private static Map<Integer,EnumBusiness> map = new HashMap<Integer,EnumBusiness>(); |
|
|
|
static { |
|
|
|
for (EnumBusiness value : values()) { |
|
|
|
map.put(value.code, value); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public static EnumBusiness getEnum(Integer code) { |
|
|
|
if (code == null) return null; |
|
|
|
@@ -37,14 +43,7 @@ public enum EnumBusiness { |
|
|
|
|
|
|
|
private Integer code; |
|
|
|
private String message; |
|
|
|
private static Map<Integer,EnumBusiness> map |
|
|
|
= new HashMap<Integer,EnumBusiness>(){ |
|
|
|
{ |
|
|
|
for (EnumBusiness value : values()) { |
|
|
|
map.put(value.code, value); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
EnumBusiness(Integer code, String message) { |
|
|
|
this.code = code; |
|
|
|
|