| | |
| | | import org.springblade.core.tool.constant.BladeConstant; |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.sxkj.common.model.GenericConverter; |
| | | import org.sxkj.common.param.DetailParam; |
| | | import org.sxkj.fw.device.dto.FwDeviceTrackDTO; |
| | | import org.sxkj.fw.device.entity.FwDeviceTrackEntity; |
| | | import org.sxkj.fw.device.excel.FwDeviceTrackExcel; |
| | | import org.sxkj.fw.device.param.FwDeviceTrackPageParam; |
| | | import org.sxkj.fw.device.service.IFwDeviceTrackService; |
| | | import org.sxkj.fw.device.vo.FwDeviceTrackVO; |
| | | import org.sxkj.fw.device.wrapper.FwDeviceTrackWrapper; |
| | |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入fwDeviceTrack") |
| | | public R<FwDeviceTrackVO> detail(FwDeviceTrackDTO fwDeviceTrack) { |
| | | FwDeviceTrackEntity detail = fwDeviceTrackService.getOne(Condition.getQueryWrapper(FwDeviceTrackWrapper.build().entityDTO(fwDeviceTrack))); |
| | | public R<FwDeviceTrackVO> detail(DetailParam fwDeviceTrack) { |
| | | FwDeviceTrackEntity detail = fwDeviceTrackService.getOne(Condition.getQueryWrapper(GenericConverter.convert(fwDeviceTrack, FwDeviceTrackEntity.class))); |
| | | |
| | | if (detail == null) { |
| | | return R.fail("该记录不存在"); |
| | |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入fwDeviceTrack") |
| | | public R<IPage<FwDeviceTrackVO>> page(FwDeviceTrackDTO fwDeviceTrack, Query query) { |
| | | IPage<FwDeviceTrackEntity> pages = fwDeviceTrackService.selectFwDeviceTrackPage(Condition.getPage(query), fwDeviceTrack); |
| | | public R<IPage<FwDeviceTrackVO>> page(FwDeviceTrackPageParam fwDeviceTrack, Query query) { |
| | | IPage<FwDeviceTrackEntity> pages = fwDeviceTrackService.selectFwDeviceTrackPage(Condition.getPage(query), GenericConverter.convert(fwDeviceTrack, FwDeviceTrackDTO.class)); |
| | | return R.data(FwDeviceTrackWrapper.build().pageVO(pages)); |
| | | } |
| | | |