Commit a7bb58aa01f27318681239263ed77ae1c9a4d90b
Merge branch 'cherry-pick-9def68c7' into 'master'
fix:获取多设备优化错误提示 See merge request yunteng/thingskit!267
Showing
2 changed files
with
3 additions
and
3 deletions
... | ... | @@ -371,11 +371,11 @@ public class TkDeviceController extends BaseController { |
371 | 371 | @PreAuthorize("@check.checkPermissions({'TENANT_ADMIN','CUSTOMER_USER'},{})") |
372 | 372 | @ApiOperation("获取多种产品下的设备") |
373 | 373 | public List<DeviceDTO> getListByDeviceProfileIds( |
374 | - @RequestBody List<String> deviceProfileIds, | |
374 | + @RequestBody (required = false)List<String> deviceProfileIds, | |
375 | 375 | String organizationId) |
376 | 376 | throws ThingsboardException { |
377 | 377 | if(deviceProfileIds==null||deviceProfileIds.isEmpty()){ |
378 | - throw new TkDataValidationException(ErrorMessage.BAD_PARAMETER.getMessage()); | |
378 | + throw new TkDataValidationException(ErrorMessage.GET_DEVICE_lIST_ERROR.getMessage()); | |
379 | 379 | } |
380 | 380 | return tkdeviceService.findDevicesByOrganizationIds( |
381 | 381 | getCurrentUser().getCurrentTenantId(), | ... | ... |
... | ... | @@ -116,7 +116,7 @@ public enum ErrorMessage { |
116 | 116 | NOT_ALLOED_ISOLATED_IN_MONOLITH(500003,"【monolith】模式下,不能选择【isolated】类型的租户配置"), |
117 | 117 | MESSAGE_TEMPLATE_USING_CONFIG(500004,"消息配置正在被消息模板【%s】使用"), |
118 | 118 | INVALID_PARAMETER_IMPORT(400068, "网关子设备产品中不允许导入服务,事件类的物模型"), |
119 | - DELETE_MENU_ERROR(400069, "该菜单下存在子菜单,需先删除子菜单"); | |
119 | + GET_DEVICE_lIST_ERROR(400070, "请先在组态编辑页面绑定产品"); | |
120 | 120 | private final int code; |
121 | 121 | private String message; |
122 | 122 | ... | ... |