Showing
2 changed files
with
2 additions
and
1 deletions
... | ... | @@ -94,6 +94,7 @@ public enum ErrorMessage { |
94 | 94 | SHARE_VIEW_TYPE_NOT_EXIST(400070,"分享视图类型不存在"), |
95 | 95 | DATA_STATE_ENABLE_NOT_DELETE(400071,"【%s】数据为启用状态不能删除!!"), |
96 | 96 | EXECUTE_COMMAND_IS_NULL(400072,"执行命令不能为空"), |
97 | + DEVICE_NAME_ALREADY_EXISTS(400073,"别名或设备名称已被使用"), | |
97 | 98 | HAVE_NO_PERMISSION(500002,"没有修改权限"); |
98 | 99 | private final int code; |
99 | 100 | private String message; | ... | ... |
... | ... | @@ -109,7 +109,7 @@ public class TkDeviceServiceImpl extends AbstractBaseService<DeviceMapper, TkDev |
109 | 109 | |
110 | 110 | // 验证设备名称是否已经存在 如果此处直接使用deviceDTO 将有误 |
111 | 111 | if (deviceNameUsed(currentTenantId, deviceDTO.getName(), deviceDTO.getId())) { |
112 | - throw new TkDataValidationException(ErrorMessage.NAME_ALREADY_EXISTS.getMessage()); | |
112 | + throw new TkDataValidationException(ErrorMessage.DEVICE_NAME_ALREADY_EXISTS.getMessage()); | |
113 | 113 | } |
114 | 114 | if (insert) { |
115 | 115 | deviceTenantId = currentTenantId; | ... | ... |