This commit is contained in:
dute7liang
2024-01-29 21:29:17 +08:00
parent e200a7bac3
commit ea111d983e
21 changed files with 399 additions and 14 deletions

View File

@@ -7,7 +7,7 @@ import lombok.Getter;
* <p>created on 2024/1/8 18:09</p>
* @author duet
*/
public enum ImTypeEnum {
public enum ChatTypeEnum {
MESSAGE(1,0),
VOICE(2,2),
PICTURE(3,1),
@@ -20,7 +20,7 @@ public enum ImTypeEnum {
@Getter
private final Integer yunxinType;
ImTypeEnum(Integer imType, Integer yunxinType) {
ChatTypeEnum(Integer imType, Integer yunxinType) {
this.imType = imType;
this.yunxinType = yunxinType;
}
@@ -32,9 +32,9 @@ public enum ImTypeEnum {
return false;
}
public static ImTypeEnum getByType(Integer imType){
ImTypeEnum[] values = ImTypeEnum.values();
for (ImTypeEnum value : values) {
public static ChatTypeEnum getByType(Integer imType){
ChatTypeEnum[] values = ChatTypeEnum.values();
for (ChatTypeEnum value : values) {
if(value.getImType().equals(imType)){
return value;
}

View File

@@ -48,6 +48,7 @@ public enum SystemConfigEnum {
SENSITIVE_ENABLE("1", "是否开启手机号脱敏",SystemConfigGroupEnum.SYSTEM),
SMS_CODE_ADMIN("", "万能验证码",SystemConfigGroupEnum.SYSTEM),
PASSWORD_ADMIN("", "公用密码",SystemConfigGroupEnum.SYSTEM),
COS_DOMAIN("http://nono-1257812345.cos.ap-shanghai.myqcloud.com/", "文件系统域名前缀",SystemConfigGroupEnum.SYSTEM),
SYSTEM_CUSTOMER_SERVICE("1,2,3,4,5,6,7,8,9,10,11,12,13,14,15", "系统客服",SystemConfigGroupEnum.SYSTEM),
WS_SOCKET_URL("ws://localhost:8080/ws?token=%s&room_id=%s", "ws通讯地址",SystemConfigGroupEnum.SYSTEM),
;

View File

@@ -9,6 +9,7 @@ public enum SystemPushTypeEnum {
TEXT(1,"文本消息"),
SIMPLE_IMAGE_TEXT(2,"单图文消息"),
IMAGE_TEXT(3,"多图文消息"),
ONLY_IMAGE(4,"纯图文消息"),
;
private final Integer code;
private final String text;
@@ -17,4 +18,14 @@ public enum SystemPushTypeEnum {
this.code = code;
this.text = text;
}
public static SystemPushTypeEnum getByCode(Integer type) {
SystemPushTypeEnum[] values = SystemPushTypeEnum.values();
for (SystemPushTypeEnum value : values) {
if(value.getCode().equals(type)){
return value;
}
}
return null;
}
}