| | |
| | | import java.util.Arrays; |
| | | |
| | | @Api(tags = "设备报修管理") |
| | | @RequestMapping("/device/reppair") |
| | | @RequestMapping("/device/repair") |
| | | @RestController |
| | | public class DeviceRepairController { |
| | | |
| | |
| | | @ApiModelProperty("根据id查询设备报修") |
| | | @GetMapping("/{id}") |
| | | public AjaxResult detail(@PathVariable Long id) { |
| | | return AjaxResult.success(deviceRepairService.getById(id)); |
| | | DeviceRepairDto byId = deviceRepairService.detailById(id); |
| | | return AjaxResult.success(byId); |
| | | } |
| | | |
| | | @PutMapping () |
| | |
| | | return deviceRepairService.updateDeviceRepair(deviceRepair); |
| | | } |
| | | |
| | | @PostMapping ("repair") |
| | | @ApiModelProperty("设备维修") |
| | | public AjaxResult repair( @RequestBody DeviceRepair deviceRepair) { |
| | | deviceRepair.setStatus(1); |
| | | return deviceRepairService.updateDeviceRepair(deviceRepair); |
| | | } |
| | | |
| | | @DeleteMapping("/{ids}") |
| | | @ApiModelProperty("删除设备报修") |
| | | public AjaxResult delete(@PathVariable("ids") Long[] ids) { |