Commit 4925825e by 李小龙

整理代码

parent 6f71b2ca
...@@ -8,6 +8,7 @@ import com.makeit.common.response.ApiResponseUtils; ...@@ -8,6 +8,7 @@ import com.makeit.common.response.ApiResponseUtils;
import com.makeit.dto.platform.device.PlatDeviceDetailDTO; import com.makeit.dto.platform.device.PlatDeviceDetailDTO;
import com.makeit.dto.platform.device.PlatDeviceEditDTO; import com.makeit.dto.platform.device.PlatDeviceEditDTO;
import com.makeit.entity.platform.device.PlatDevice; import com.makeit.entity.platform.device.PlatDevice;
import com.makeit.global.aspect.tenant.TenantIdIgnore;
import com.makeit.service.platform.device.PlatDeviceService; import com.makeit.service.platform.device.PlatDeviceService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -26,18 +27,21 @@ public class SaasDeviceController { ...@@ -26,18 +27,21 @@ public class SaasDeviceController {
@ApiOperation("列表") @ApiOperation("列表")
@PostMapping("page") @PostMapping("page")
@TenantIdIgnore
public ApiResponseEntity<PageVO<PlatDevice>> page(@RequestBody PageReqDTO<PlatDevice> pageReqDTO) { public ApiResponseEntity<PageVO<PlatDevice>> page(@RequestBody PageReqDTO<PlatDevice> pageReqDTO) {
return ApiResponseUtils.success(platDeviceService.pageSaas(pageReqDTO)); return ApiResponseUtils.success(platDeviceService.pageSaas(pageReqDTO));
} }
@ApiOperation("设备信息") @ApiOperation("设备信息")
@PostMapping("detail") @PostMapping("detail")
@TenantIdIgnore
public ApiResponseEntity<PlatDeviceDetailDTO> detail(@RequestBody BaseIdDTO baseIdDTO) { public ApiResponseEntity<PlatDeviceDetailDTO> detail(@RequestBody BaseIdDTO baseIdDTO) {
return ApiResponseUtils.success(platDeviceService.getDetailDTO(baseIdDTO.getId())); return ApiResponseUtils.success(platDeviceService.getDetailDTO(baseIdDTO.getId()));
} }
@ApiOperation("设备编辑") @ApiOperation("设备编辑")
@PostMapping("edit") @PostMapping("edit")
@TenantIdIgnore
public ApiResponseEntity<Void> edit(@RequestBody PlatDeviceEditDTO dto) { public ApiResponseEntity<Void> edit(@RequestBody PlatDeviceEditDTO dto) {
platDeviceService.edit(dto); platDeviceService.edit(dto);
return ApiResponseUtils.success(); return ApiResponseUtils.success();
...@@ -45,6 +49,7 @@ public class SaasDeviceController { ...@@ -45,6 +49,7 @@ public class SaasDeviceController {
@ApiOperation("实时数据") @ApiOperation("实时数据")
@PostMapping("realTimeDate") @PostMapping("realTimeDate")
@TenantIdIgnore
public ApiResponseEntity<PlatDevice> realTimeDate(@RequestBody PlatDevice platDevice) { public ApiResponseEntity<PlatDevice> realTimeDate(@RequestBody PlatDevice platDevice) {
//todo //todo
return null; return null;
...@@ -52,6 +57,7 @@ public class SaasDeviceController { ...@@ -52,6 +57,7 @@ public class SaasDeviceController {
@ApiOperation("数据分析") @ApiOperation("数据分析")
@PostMapping("dataAnalysis") @PostMapping("dataAnalysis")
@TenantIdIgnore
public ApiResponseEntity<PlatDevice> dataAnalysis(@RequestBody PlatDevice platDevice) { public ApiResponseEntity<PlatDevice> dataAnalysis(@RequestBody PlatDevice platDevice) {
//todo //todo
return null; return null;
......
...@@ -18,7 +18,6 @@ import com.makeit.entity.platform.device.PlatDevice; ...@@ -18,7 +18,6 @@ import com.makeit.entity.platform.device.PlatDevice;
import com.makeit.entity.platform.device.PlatDeviceOther; import com.makeit.entity.platform.device.PlatDeviceOther;
import com.makeit.enums.CodeMessageEnum; import com.makeit.enums.CodeMessageEnum;
import com.makeit.exception.BusinessException; import com.makeit.exception.BusinessException;
import com.makeit.global.aspect.tenant.TenantIdIgnore;
import com.makeit.mapper.platform.device.PlatDeviceMapper; import com.makeit.mapper.platform.device.PlatDeviceMapper;
import com.makeit.service.platform.auth.PlatOrgService; import com.makeit.service.platform.auth.PlatOrgService;
import com.makeit.service.platform.device.PlatDeviceOtherService; import com.makeit.service.platform.device.PlatDeviceOtherService;
...@@ -180,7 +179,6 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev ...@@ -180,7 +179,6 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
} }
@Override @Override
@TenantIdIgnore
public PageVO<PlatDevice> pageSaas(PageReqDTO<PlatDevice> pageReqDTO) { public PageVO<PlatDevice> pageSaas(PageReqDTO<PlatDevice> pageReqDTO) {
PlatDevice param = pageReqDTO.getData(); PlatDevice param = pageReqDTO.getData();
Page<PlatDevice> page = PageUtil.toMpPage(pageReqDTO); Page<PlatDevice> page = PageUtil.toMpPage(pageReqDTO);
......
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