Commit 522821da by huangjy

feat:对外api

parent 97eed631
...@@ -13,6 +13,7 @@ import com.makeit.global.aspect.tenant.TenantIdIgnore; ...@@ -13,6 +13,7 @@ import com.makeit.global.aspect.tenant.TenantIdIgnore;
import com.makeit.service.platform.alarm.PlatAlarmRecordService; import com.makeit.service.platform.alarm.PlatAlarmRecordService;
import com.makeit.service.platform.device.PlatDeviceService; import com.makeit.service.platform.device.PlatDeviceService;
import com.makeit.service.platform.elder.PlatElderService; import com.makeit.service.platform.elder.PlatElderService;
import com.makeit.utils.old.StringUtils;
import com.makeit.vo.platform.alarm.PlatAlarmRecordVO; import com.makeit.vo.platform.alarm.PlatAlarmRecordVO;
import com.makeit.vo.platform.device.PlatDeviceListVO; import com.makeit.vo.platform.device.PlatDeviceListVO;
import com.makeit.vo.platform.elder.PlatElderListVO; import com.makeit.vo.platform.elder.PlatElderListVO;
...@@ -45,6 +46,10 @@ public class IotPlatExternalController { ...@@ -45,6 +46,10 @@ public class IotPlatExternalController {
@TenantIdIgnore @TenantIdIgnore
@AuthIgnore @AuthIgnore
public ApiResponseEntity<PageVO<PlatElderListVO>> elderPage(@RequestBody PageReqDTO<PlatElderQueryDTO> page) { public ApiResponseEntity<PageVO<PlatElderListVO>> elderPage(@RequestBody PageReqDTO<PlatElderQueryDTO> page) {
PlatElderQueryDTO dto = page.getData();
if (dto == null || StringUtils.isEmpty(dto.getOrgId())) {
return ApiResponseUtils.success(new PageVO<>());
}
return ApiResponseUtils.success(platElderService.page(page)); return ApiResponseUtils.success(platElderService.page(page));
} }
...@@ -54,6 +59,10 @@ public class IotPlatExternalController { ...@@ -54,6 +59,10 @@ public class IotPlatExternalController {
@TenantIdIgnore @TenantIdIgnore
@AuthIgnore @AuthIgnore
public ApiResponseEntity<PageVO<PlatDeviceListVO>> devicePage(@RequestBody PageReqDTO<PlatDeviceQueryDTO> pageReqDTO) { public ApiResponseEntity<PageVO<PlatDeviceListVO>> devicePage(@RequestBody PageReqDTO<PlatDeviceQueryDTO> pageReqDTO) {
PlatDeviceQueryDTO dto = pageReqDTO.getData();
if (dto == null || StringUtils.isEmpty(dto.getOrgId())) {
return ApiResponseUtils.success(new PageVO<>());
}
return ApiResponseUtils.success(platDeviceService.page(pageReqDTO)); return ApiResponseUtils.success(platDeviceService.page(pageReqDTO));
} }
...@@ -62,8 +71,12 @@ public class IotPlatExternalController { ...@@ -62,8 +71,12 @@ public class IotPlatExternalController {
@PostMapping("alarmRecordPage") @PostMapping("alarmRecordPage")
@TenantIdIgnore @TenantIdIgnore
@AuthIgnore @AuthIgnore
public ApiResponseEntity<PageVO<PlatAlarmRecordVO>> page(@RequestBody PageReqDTO<PlatAlarmRecordQueryDTO> dto) { public ApiResponseEntity<PageVO<PlatAlarmRecordVO>> page(@RequestBody PageReqDTO<PlatAlarmRecordQueryDTO> pageReqDTO) {
return ApiResponseUtils.success(platAlarmRecordService.page(dto)); PlatAlarmRecordQueryDTO dto = pageReqDTO.getData();
if (dto == null || StringUtils.isEmpty(dto.getOrgId())) {
return ApiResponseUtils.success(new PageVO<>());
}
return ApiResponseUtils.success(platAlarmRecordService.page(pageReqDTO));
} }
@ApiOperation("处理告警回调") @ApiOperation("处理告警回调")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment