吉安感知网项目-后端
xiebin
2026-01-12 2cd4bf987f9e98023bb9e44d3bd94d889e000b66
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/controller/FwDeviceController.java
@@ -33,9 +33,12 @@
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import org.sxkj.common.model.GenericConverter;
import org.sxkj.fw.device.dto.FwDeviceDTO;
import org.sxkj.fw.device.entity.FwDeviceEntity;
import org.sxkj.fw.device.excel.FwDeviceExcel;
import org.sxkj.fw.device.param.FwDeviceDetailParam;
import org.sxkj.fw.device.param.FwDevicePageParam;
import org.sxkj.fw.device.service.IFwDeviceService;
import org.sxkj.fw.device.vo.FwDeviceVO;
import org.sxkj.fw.device.wrapper.FwDeviceWrapper;
@@ -66,8 +69,8 @@
   @GetMapping("/detail")
   @ApiOperationSupport(order = 1)
   @ApiOperation(value = "详情", notes = "传入fwDevice")
   public R<FwDeviceVO> detail(FwDeviceDTO fwDevice) {
      FwDeviceEntity detail = fwDeviceService.getOne(Condition.getQueryWrapper(FwDeviceWrapper.build().entityDTO(fwDevice)));
   public R<FwDeviceVO> detail(@Valid FwDeviceDetailParam fwDevice) {
      FwDeviceEntity detail = fwDeviceService.getOne(Condition.getQueryWrapper(GenericConverter.convert(fwDevice, FwDeviceEntity.class)));
      if (detail == null) {
         return R.fail("该设备不存在");
@@ -82,8 +85,8 @@
   @GetMapping("/page")
   @ApiOperationSupport(order = 2)
   @ApiOperation(value = "分页", notes = "传入fwDevice")
   public R<IPage<FwDeviceVO>> page(FwDeviceDTO fwDevice, Query query) {
      IPage<FwDeviceEntity> pages = fwDeviceService.selectFwDevicePage(Condition.getPage(query), fwDevice);
   public R<IPage<FwDeviceVO>> page(FwDevicePageParam fwDevice, Query query) {
      IPage<FwDeviceEntity> pages = fwDeviceService.selectFwDevicePage(Condition.getPage(query), GenericConverter.convert(fwDevice, FwDeviceDTO.class));
      return R.data(FwDeviceWrapper.build().pageVO(pages));
   }