mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-27 04:49:47 +01:00
updata:补充国际化键名
This commit is contained in:
parent
41679f4e1d
commit
4608c81ea6
6 changed files with 12 additions and 6 deletions
|
|
@ -164,4 +164,6 @@ public interface ErrorCode {
|
||||||
|
|
||||||
// 字典相关错误码
|
// 字典相关错误码
|
||||||
int DICT_LABEL_DUPLICATE = 10128; // 字典标签重复
|
int DICT_LABEL_DUPLICATE = 10128; // 字典标签重复
|
||||||
|
// 模型相关错误码
|
||||||
|
int MODEL_TYPE_PROVIDE_CODE_NOT_NULL = 10129; // modelType和provideCode不能为空
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ public class ModelConfigServiceImpl extends BaseServiceImpl<ModelConfigDao, Mode
|
||||||
public ModelConfigDTO add(String modelType, String provideCode, ModelConfigBodyDTO modelConfigBodyDTO) {
|
public ModelConfigDTO add(String modelType, String provideCode, ModelConfigBodyDTO modelConfigBodyDTO) {
|
||||||
// 先验证有没有供应器
|
// 先验证有没有供应器
|
||||||
if (StringUtils.isBlank(modelType) || StringUtils.isBlank(provideCode)) {
|
if (StringUtils.isBlank(modelType) || StringUtils.isBlank(provideCode)) {
|
||||||
throw new RenException("modelType和provideCode不能为空");
|
throw new RenException(ErrorCode.MODEL_TYPE_PROVIDE_CODE_NOT_NULL);
|
||||||
}
|
}
|
||||||
List<ModelProviderDTO> providerList = modelProviderService.getList(modelType, provideCode);
|
List<ModelProviderDTO> providerList = modelProviderService.getList(modelType, provideCode);
|
||||||
if (CollectionUtil.isEmpty(providerList)) {
|
if (CollectionUtil.isEmpty(providerList)) {
|
||||||
|
|
@ -124,7 +124,7 @@ public class ModelConfigServiceImpl extends BaseServiceImpl<ModelConfigDao, Mode
|
||||||
public ModelConfigDTO edit(String modelType, String provideCode, String id, ModelConfigBodyDTO modelConfigBodyDTO) {
|
public ModelConfigDTO edit(String modelType, String provideCode, String id, ModelConfigBodyDTO modelConfigBodyDTO) {
|
||||||
// 先验证有没有供应器
|
// 先验证有没有供应器
|
||||||
if (StringUtils.isBlank(modelType) || StringUtils.isBlank(provideCode)) {
|
if (StringUtils.isBlank(modelType) || StringUtils.isBlank(provideCode)) {
|
||||||
throw new RenException("modelType和provideCode不能为空");
|
throw new RenException(ErrorCode.MODEL_TYPE_PROVIDE_CODE_NOT_NULL);
|
||||||
}
|
}
|
||||||
List<ModelProviderDTO> providerList = modelProviderService.getList(modelType, provideCode);
|
List<ModelProviderDTO> providerList = modelProviderService.getList(modelType, provideCode);
|
||||||
if (CollectionUtil.isEmpty(providerList)) {
|
if (CollectionUtil.isEmpty(providerList)) {
|
||||||
|
|
|
||||||
|
|
@ -135,3 +135,4 @@
|
||||||
10124=您的mqtt密钥长度不安全,mqtt密钥必须同时包含大小写字母
|
10124=您的mqtt密钥长度不安全,mqtt密钥必须同时包含大小写字母
|
||||||
10125=您的mqtt密钥包含弱密码
|
10125=您的mqtt密钥包含弱密码
|
||||||
10128=字典标签重复
|
10128=字典标签重复
|
||||||
|
10129=modelType和provideCode不能为空
|
||||||
|
|
@ -135,3 +135,4 @@
|
||||||
10124=Your MQTT secret is not secure, MQTT secret must contain both uppercase and lowercase letters
|
10124=Your MQTT secret is not secure, MQTT secret must contain both uppercase and lowercase letters
|
||||||
10125=Your MQTT secret contains weak password
|
10125=Your MQTT secret contains weak password
|
||||||
10128=Dictionary label is duplicated
|
10128=Dictionary label is duplicated
|
||||||
|
10129=modelType and provideCode cannot be empty
|
||||||
|
|
@ -135,3 +135,4 @@
|
||||||
10124=您的mqtt密钥长度不安全,mqtt密钥必须同时包含大小写字母
|
10124=您的mqtt密钥长度不安全,mqtt密钥必须同时包含大小写字母
|
||||||
10125=您的mqtt密钥包含弱密码
|
10125=您的mqtt密钥包含弱密码
|
||||||
10128=字典标签重复
|
10128=字典标签重复
|
||||||
|
10129=modelType和provideCode不能为空
|
||||||
|
|
@ -135,3 +135,4 @@
|
||||||
10124=您的MQTT密鑰不安全,MQTT密鑰必須同時包含大小寫字母
|
10124=您的MQTT密鑰不安全,MQTT密鑰必須同時包含大小寫字母
|
||||||
10125=您的MQTT密鑰包含弱密碼
|
10125=您的MQTT密鑰包含弱密碼
|
||||||
10128=字典標籤重複
|
10128=字典標籤重複
|
||||||
|
10129=modelType和provideCode不能為空
|
||||||
Loading…
Reference in a new issue