| | |
| | | import cn.gistack.sm.jcsb.entity.DeviceReport; |
| | | import cn.gistack.sm.jcsb.vo.DeviceReportVO; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import io.swagger.annotations.*; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | |
| | | * 详情 |
| | | */ |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入notice") |
| | | public R<DeviceReportVO> detail(DeviceReport deviceReport) { |
| | | DeviceReportVO deviceReportVO = deviceReportService.getDetail(deviceReport); |
| | |
| | | * 多表联合查询自定义分页 |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入notice") |
| | | public R<IPage<DeviceReportVO>> page(@ApiIgnore DeviceReportVO deviceReportVO, Query query) { |
| | | IPage<DeviceReportVO> pages = deviceReportService.selectDeviceReportPage(Condition.getPage(query), deviceReportVO); |
| | |
| | | * 新增 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入notice") |
| | | public R save(@RequestBody DeviceReport deviceReport) { |
| | | return R.data(deviceReportService.save(deviceReport)); |
| | |
| | | * 修改 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入notice") |
| | | public R update(@RequestBody DeviceReport deviceReport) { |
| | | return R.data(deviceReportService.updateById(deviceReport)); |
| | |
| | | * 新增或修改 |
| | | */ |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入notice") |
| | | public R submit(@RequestBody DeviceReport deviceReport) { |
| | | return R.data(deviceReportService.saveOrUpdate(deviceReport)); |
| | |
| | | * 删除 |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "逻辑删除", notes = "传入notice") |
| | | public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) { |
| | | return R.data(deviceReportService.removeBatchByIds(Func.toLongList(ids))); |