消息接口修改

yun-zuoyi
yihang.lv 6 years ago
parent 950c6dee36
commit cdd0e5fc05

@ -259,4 +259,209 @@ public class SwebEnumUtil {
return tmp;
}
}
/**
*
* 1.NOTICE
* 2.STATION_LETTER
* 3.SWEB_NOTICESWEB
*/
@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_NOTICESWEB
*/
@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_FEimpp
* SWEB_FEsweb
*/
@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;
}
}
}

@ -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;
}
}

Loading…
Cancel
Save