mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-20 00:06:53 +08:00
feat: 新增功能:导出消息时记录错误提示
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package com.xboe.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 错误码枚举
|
||||
*/
|
||||
@Getter
|
||||
public enum CaseAiChatErrCodeEnum {
|
||||
|
||||
SUCCESS(0, "成功"),
|
||||
|
||||
INTERNAL_ERROR(1, "内部错误"),
|
||||
|
||||
AIOT_ERROR(2, "AIoT平台错误"),
|
||||
;
|
||||
|
||||
private final int code;
|
||||
|
||||
private final String label;
|
||||
|
||||
CaseAiChatErrCodeEnum(int code, String label) {
|
||||
this.code = code;
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public static CaseAiChatErrCodeEnum getByCode(int code) {
|
||||
return Arrays.stream(values()).filter(e -> e.code == code)
|
||||
.findFirst().orElse(SUCCESS);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user