提交部分 config 的单元测试

This commit is contained in:
YunaiV
2021-03-06 02:39:21 +08:00
parent ba34e3c987
commit 72817a8632
4 changed files with 30 additions and 20 deletions

View File

@ -10,7 +10,7 @@ import cn.iocoder.dashboard.common.exception.ErrorCode;
public interface InfErrorCodeConstants {
// ========== 参数配置 1001000000 ==========
ErrorCode CONFIG_NOT_FOUND = new ErrorCode(1001000001, "参数配置不存在");
ErrorCode CONFIG_NOT_EXISTS = new ErrorCode(1001000001, "参数配置不存在");
ErrorCode CONFIG_KEY_DUPLICATE = new ErrorCode(1001000002, "参数配置 key 重复");
ErrorCode CONFIG_CAN_NOT_DELETE_SYSTEM_TYPE = new ErrorCode(1001000003, "不能删除类型为系统内置的参数配置");
ErrorCode CONFIG_GET_VALUE_ERROR_IF_SENSITIVE = new ErrorCode(1001000004, "不允许获取敏感配置到前端");

View File

@ -105,7 +105,7 @@ public class InfConfigServiceImpl implements InfConfigService {
}
InfConfigDO config = configMapper.selectById(id);
if (config == null) {
throw ServiceExceptionUtil.exception(CONFIG_NOT_FOUND);
throw ServiceExceptionUtil.exception(CONFIG_NOT_EXISTS);
}
return config;
}