This commit is contained in:
张良(004796)
2024-01-08 19:13:01 +08:00
parent fad404fe58
commit 2010eb4133
11 changed files with 249 additions and 10 deletions

View File

@@ -0,0 +1,44 @@
package com.ruoyi.cai.enums;
import lombok.Getter;
/**
* 1.文本 2.语音 3.图片 4.视频 100 。自定义
* <p>created on 2024/1/8 18:09</p>
* @author duet
*/
public enum ImTypeEnum {
MESSAGE(1,0),
VOICE(2,2),
PICTURE(3,1),
VIDEO(4,3),
CUSTOM(100,100)
;
@Getter
private final Integer imType;
@Getter
private final Integer yunxinType;
ImTypeEnum(Integer imType, Integer yunxinType) {
this.imType = imType;
this.yunxinType = yunxinType;
}
public boolean isFileType(){
if(this.getImType().equals(2) || this.getImType().equals(3) || this.getImType().equals(4)){
return true;
}
return false;
}
public static ImTypeEnum getByType(Integer imType){
ImTypeEnum[] values = ImTypeEnum.values();
for (ImTypeEnum value : values) {
if(value.getImType().equals(imType)){
return value;
}
}
return null;
}
}

View File

@@ -27,6 +27,7 @@ public enum SystemConfigEnum {
SENSITIVE_ENABLE("1", "是否开启手机号脱敏",SystemConfigGroupEnum.SYSTEM),
SMS_CODE_ADMIN("", "万能验证码",SystemConfigGroupEnum.SYSTEM),
PASSWORD_ADMIN("", "公用密码",SystemConfigGroupEnum.SYSTEM),
SYSTEM_CUSTOMER_SERVICE("", "系统客服",SystemConfigGroupEnum.SYSTEM),
;