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