diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/SwebEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/SwebEnumUtil.java index 4b2e9fc..e55fa30 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/SwebEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/SwebEnumUtil.java @@ -259,4 +259,209 @@ public class SwebEnumUtil { return tmp; } } + + /** + * 用户消息类型 + * 1.NOTICE:通知 + * 2.STATION_LETTER:站内信 + * 3.SWEB_NOTICE:SWEB通知 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum MESSAGE_TYPE { + + MAIL(1, "邮件", "邮件"), + LETTER(2, "站内信", "站内信"), + SWEB_NOTICE(3, "SWEB通知", "SWEB通知"), + SWEB_PUBLIC_NOTICE(4, "SWEB公告", "SWEB公告"); + + private int value; + private String name; + private String description; + + MESSAGE_TYPE() { + } + + MESSAGE_TYPE(int value, String name, String description) { + this.value = value; + this.name = name; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getName() { + return name; + } + + public String getDescription() { + return description; + } + + public static String valueOfCode(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].name; + } + } + return tmp; + } + + 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; + } + + public static String codeOfDescription(String code) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].name.equals(code)) { + tmp = values()[i].description; + } + } + return tmp; + } + } + + /** + * 附件来源 + * 1.NOTICE:通知 + * 2.STATION_LETTER:站内信 + * 3.SWEB_NOTICE:SWEB通知 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum FILE_ATTACH_SOURCE { + MAIL(1, "邮件", "邮件"), + LETTER(2, "站内信", "站内信"), + SWEB_NOTICE(3, "SWEB通知", "SWEB通知"), + SWEB_PUBLIC_NOTICE(4, "SWEB公告", "SWEB公告"); + + private int value; + private String name; + private String description; + + FILE_ATTACH_SOURCE() { + } + + FILE_ATTACH_SOURCE(int value, String name, String description) { + this.value = value; + this.name = name; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getName() { + return name; + } + + public String getDescription() { + return description; + } + + public static String valueOfCode(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].name; + } + } + return tmp; + } + + 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; + } + + public static String codeOfDescription(String code) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].name.equals(code)) { + tmp = values()[i].description; + } + } + return tmp; + } + } + + /** + * 前端系统平台 + * IMPP_FE:impp系统 + * SWEB_FE:sweb系统 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum FE_PLATFORM { + IMPP_FE("IMPP_FE", "IMPP_FE", "impp系统"), + SWEB_FE("SWEB_FE", "SWEB_FE", "sweb系统"); + + private String value; + private String name; + private String description; + + FE_PLATFORM() { + } + + FE_PLATFORM(String value, String name, String description) { + this.value = value; + this.name = name; + this.description = description; + } + + public String getValue() { + return value; + } + + public String getName() { + return name; + } + + public String getDescription() { + return description; + } + + public static String valueOfCode(String val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].name; + } + } + return tmp; + } + + public static String valueOfDescription(String val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + return tmp; + } + + public static String codeOfDescription(String code) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].name.equals(code)) { + tmp = values()[i].description; + } + } + return tmp; + } + } } diff --git a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/modelbean/SwebLoginUserModel.java b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/modelbean/SwebLoginUserModel.java index 8076ebd..3594480 100644 --- a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/modelbean/SwebLoginUserModel.java +++ b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/modelbean/SwebLoginUserModel.java @@ -31,4 +31,9 @@ public class SwebLoginUserModel implements Serializable { @ApiParam(value = "ip地址") private String ip; + + public SwebLoginUserModel(Long id, String userName) { + this.id = id; + this.userName = userName; + } }