| | |
| | | package com.ycl.controller.epuipment; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ycl.annotation.LogSave; |
| | | import com.ycl.api.CommonResult; |
| | | import com.ycl.controller.BaseController; |
| | |
| | | |
| | | @GetMapping("/query") |
| | | @ApiOperation("查询") |
| | | @LogSave |
| | | public CommonResult<Page<HandheldTerminalVo>> search(@RequestParam(required = false) Integer size, |
| | | @RequestParam(required = false) Integer current, |
| | | @RequestParam(required = false) Short state) { |
| | | return CommonResult.success(handheldTerminalService.search(size, current, state)); |
| | | @LogSave(operationType = "手持设备管理", contain = "查询") |
| | | public CommonResult<IPage<HandheldTerminalVo>> search(@RequestParam(required = true) Integer currentPage, |
| | | @RequestParam(required = true) Integer pageSize, |
| | | @RequestParam(required = false) Short state) { |
| | | return CommonResult.success(handheldTerminalService.search(pageSize, currentPage, state)); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @ApiOperation("添加") |
| | | @LogSave(operationType = "手持设备管理", contain = "添加手持设备") |
| | | public CommonResult add(@RequestBody HandheldTerminal handheldTerminal) { |
| | | return CommonResult.success(null); |
| | | handheldTerminal.setState(Short.valueOf("1")); |
| | | handheldTerminalService.save(handheldTerminal); |
| | | return CommonResult.success(true); |
| | | } |
| | | |
| | | @PutMapping("/update") |
| | | @ApiOperation("修改") |
| | | @LogSave(operationType = "手持设备管理", contain = "修改手持设备") |
| | | public CommonResult update(@RequestBody HandheldTerminal handheldTerminal) { |
| | | return CommonResult.success(null); |
| | | |
| | | handheldTerminalService.updateById(handheldTerminal); |
| | | return CommonResult.success(true); |
| | | } |
| | | |
| | | @DeleteMapping("/delete/{id}") |
| | | @ApiOperation("删除") |
| | | @LogSave(operationType = "手持设备管理", contain = "删除手持设备") |
| | | public CommonResult delete(@PathVariable Long id) { |
| | | |
| | | handheldTerminalService.removeById(id); |
| | | return CommonResult.success(null); |
| | | } |
| | | |