|
|
@@ -0,0 +1,37 @@
|
|
|
+package com.yunfeiyun.agmp.iot.common.enums.warn;
|
|
|
+
|
|
|
+import com.yunfeiyun.agmp.common.utils.StringUtils;
|
|
|
+
|
|
|
+public enum IotWarnPolicyChannel {
|
|
|
+ APP("0","APP"),
|
|
|
+ SMS("1","短信"),
|
|
|
+ WECHAT("2","微信"),
|
|
|
+ DING_TALK("3","钉钉"),
|
|
|
+ STATION_MSG("4","站内信");
|
|
|
+
|
|
|
+ private String code;
|
|
|
+ private String content;
|
|
|
+
|
|
|
+ IotWarnPolicyChannel(String code,String content){
|
|
|
+ this.code = code;
|
|
|
+ this.content = content;
|
|
|
+ }
|
|
|
+ public String getContent(){
|
|
|
+ return this.content;
|
|
|
+ }
|
|
|
+ public String getCode(){
|
|
|
+ return this.code;
|
|
|
+ }
|
|
|
+
|
|
|
+ public IotWarnPolicyChannel findByCode(String code){
|
|
|
+ if(StringUtils.isEmpty(code)){
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ for(IotWarnPolicyChannel iotWarnPolicyChannel : IotWarnPolicyChannel.values()){
|
|
|
+ if(iotWarnPolicyChannel.code.equals(code)){
|
|
|
+ return iotWarnPolicyChannel;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+}
|