123
This commit is contained in:
44
ruoyi-cai/src/main/java/com/ruoyi/cai/enums/ImTypeEnum.java
Normal file
44
ruoyi-cai/src/main/java/com/ruoyi/cai/enums/ImTypeEnum.java
Normal 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;
|
||||
}
|
||||
}
|
||||
@@ -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),
|
||||
;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user