mirror of
https://github.com/ZSCNetSupportDept/WechatTicketSystem.git
synced 2025-10-30 09:56:18 +08:00
@@ -28,33 +28,33 @@ import static love.sola.netsupport.config.Lang.lang;
|
||||
*/
|
||||
public class Status {
|
||||
|
||||
public static final int UNCHECKED = 0;
|
||||
public static final int ARRANGED = 1;
|
||||
public static final int PUTOFF = 2;
|
||||
public static final int REPORTED = 4;
|
||||
public static final int ISP_HANDLED = 7;
|
||||
public static final int SOLVED = 9;
|
||||
public static final int UNCHECKED = 0;
|
||||
public static final int ARRANGED = 1;
|
||||
public static final int PUTOFF = 2;
|
||||
public static final int REPORTED = 4;
|
||||
public static final int ISP_HANDLED = 7;
|
||||
public static final int SOLVED = 9;
|
||||
|
||||
public static final Map<Integer, String> inverseMap = new HashMap<>();
|
||||
public static final Map<Integer, String> inverseMap = new HashMap<>();
|
||||
|
||||
static {
|
||||
System.out.println("Loading Status...");
|
||||
for (Field field : Status.class.getDeclaredFields()) {
|
||||
if (field.getType().isAssignableFrom(Integer.TYPE)) {
|
||||
try {
|
||||
inverseMap.put((Integer) field.get(null), field.getName());
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
static {
|
||||
System.out.println("Loading Status...");
|
||||
for (Field field : Status.class.getDeclaredFields()) {
|
||||
if (field.getType().isAssignableFrom(Integer.TYPE)) {
|
||||
try {
|
||||
inverseMap.put((Integer) field.get(null), field.getName());
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static String getLocalized(int status) {
|
||||
if (inverseMap.containsKey(status)) {
|
||||
return lang("STATUS_" + inverseMap.get(status));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static String getLocalized(int status) {
|
||||
if (inverseMap.containsKey(status)) {
|
||||
return lang("STATUS_" + inverseMap.get(status));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user