huminghao il y a 2 mois
Parent
révision
ebd3ee2bd2

+ 44
- 0
gly-base-core/src/main/java/cn/com/taiji/core/entity/dict/msgw/MessageStatus.java Voir le fichier

@@ -0,0 +1,44 @@
package cn.com.taiji.core.entity.dict.msgw;

import cn.com.taiji.common.manager.net.http.ServiceHandleException;


/***
* 消息状态
*/
public enum MessageStatus {

INITIAL("待发送", 1) {},
SEND_SUCCESS("已发送", 2) {},
CANCEL("消息被取消或删除", 3) {},
SEND_FAIL("发送失败", 4) {};


private final String value;
private final int code;

MessageStatus(String value, int code) {
this.value = value;
this.code = code;
}

public String getValue() {
return value;
}

public int getCode() {
return code;
}

public static MessageStatus findByCode(Integer code) throws ServiceHandleException {
if (null == code) {
return null;
}
for (MessageStatus value : MessageStatus.values()) {
if (code.equals(value.getCode())) {
return value;
}
}
return null;
}
}

+ 54
- 0
gly-base-core/src/main/java/cn/com/taiji/core/entity/dict/msgw/MessageType.java Voir le fichier

@@ -0,0 +1,54 @@
package cn.com.taiji.core.entity.dict.msgw;

import cn.com.taiji.common.manager.net.http.ServiceHandleException;

/***
* 消息类型
*/
public enum MessageType {
WEB("WEB消息", 1) {},
APP("APP消息", 2) {},
MINI_PROGRAM("微信小程序消息", 3) {},
SHORT("短信消息", 4) {},
EMAIL("邮件消息", 5) {},
OFFICIAL_ACCOUNTS("微信公众号消息", 6) {},
ZFB_MINI("支付宝小程序消息", 7) {},

;
private String value;
private Integer code;

private MessageType(String value, Integer code) {
this.value = value;
this.code = code;
}

public String getValue() {
return value;
}

public Integer getCode() {
return code;
}

public void setValue(String value) {
this.value = value;
}

public void setCode(Integer code) {
this.code = code;
}

public static MessageType findByCode(Integer code) throws ServiceHandleException {
if (null == code) {
return null;
}
for (MessageType value : MessageType.values()) {
if (code.equals(value.getCode())) {
return value;
}
}
return null;
}

}

Chargement…
Annuler
Enregistrer