Commit 522821da by huangjy

feat:对外api

parent 97eed631
......@@ -13,6 +13,7 @@ import com.makeit.global.aspect.tenant.TenantIdIgnore;
import com.makeit.service.platform.alarm.PlatAlarmRecordService;
import com.makeit.service.platform.device.PlatDeviceService;
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.device.PlatDeviceListVO;
import com.makeit.vo.platform.elder.PlatElderListVO;
......@@ -45,6 +46,10 @@ public class IotPlatExternalController {
@TenantIdIgnore
@AuthIgnore
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));
}
......@@ -54,6 +59,10 @@ public class IotPlatExternalController {
@TenantIdIgnore
@AuthIgnore
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));
}
......@@ -62,8 +71,12 @@ public class IotPlatExternalController {
@PostMapping("alarmRecordPage")
@TenantIdIgnore
@AuthIgnore
public ApiResponseEntity<PageVO<PlatAlarmRecordVO>> page(@RequestBody PageReqDTO<PlatAlarmRecordQueryDTO> dto) {
return ApiResponseUtils.success(platAlarmRecordService.page(dto));
public ApiResponseEntity<PageVO<PlatAlarmRecordVO>> page(@RequestBody PageReqDTO<PlatAlarmRecordQueryDTO> pageReqDTO) {
PlatAlarmRecordQueryDTO dto = pageReqDTO.getData();
if (dto == null || StringUtils.isEmpty(dto.getOrgId())) {
return ApiResponseUtils.success(new PageVO<>());
}
return ApiResponseUtils.success(platAlarmRecordService.page(pageReqDTO));
}
@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