Showing
1 changed file
with
10 additions
and
2 deletions
... | ... | @@ -210,8 +210,13 @@ public class TkDeviceController extends BaseController { |
210 | 210 | @PreAuthorize("@check.checkPermissions({'TENANT_ADMIN','CUSTOMER_USER'},{})") |
211 | 211 | @PostMapping(params = {PAGE_SIZE, PAGE}) |
212 | 212 | @ApiOperation("查询") |
213 | - public TkPageData<DeviceDTO> pageDevice(@RequestBody Map<String,Object> queryMap) | |
213 | + public TkPageData<DeviceDTO> pageDevice( | |
214 | + @RequestParam(PAGE_SIZE) int pageSize, | |
215 | + @RequestParam(PAGE) int page, | |
216 | + @RequestBody Map<String, Object> queryMap) | |
214 | 217 | throws ThingsboardException { |
218 | + queryMap.put(PAGE, page); | |
219 | + queryMap.put(PAGE_SIZE, pageSize); | |
215 | 220 | // 如果当前用户是客户 |
216 | 221 | if (getCurrentUser().isCustomerUser()) { |
217 | 222 | queryMap.put("customerId", getCurrentUser().getCustomerId().toString()); |
... | ... | @@ -442,7 +447,10 @@ public class TkDeviceController extends BaseController { |
442 | 447 | DeviceProfileId deviceProfileId = |
443 | 448 | new DeviceProfileId(UUID.fromString(deviceDTO.getProfileId())); |
444 | 449 | |
445 | - CustomerId customerId = StringUtils.isBlank(deviceDTO.getCustomerId())?null:new CustomerId(UUID.fromString(deviceDTO.getCustomerId())); | |
450 | + CustomerId customerId = | |
451 | + StringUtils.isBlank(deviceDTO.getCustomerId()) | |
452 | + ? null | |
453 | + : new CustomerId(UUID.fromString(deviceDTO.getCustomerId())); | |
446 | 454 | |
447 | 455 | tbDevice.setAdditionalInfo(additionalInfo); |
448 | 456 | tbDevice.setCustomerId(customerId); | ... | ... |