| | |
| | | package com.ycl.controller.writ; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ycl.annotation.LogSave; |
| | | import com.ycl.api.CommonResult; |
| | | import com.ycl.base.BaseController; |
| | | import com.ycl.controller.BaseController; |
| | | import com.ycl.entity.caseHandler.Writ; |
| | | import com.ycl.service.caseHandler.IWritService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/writ") |
| | | @Api(value = "文书管理") |
| | | @Api(tags = "文书管理") |
| | | public class WritController extends BaseController { |
| | | |
| | | @Autowired |
| | |
| | | @GetMapping("/query") |
| | | @ApiOperation(value = "查询list") |
| | | @LogSave(operationType = "文书管理", contain = "查询文书") |
| | | public CommonResult search(@RequestParam Integer size, |
| | | @RequestParam Integer current, |
| | | @RequestParam(required = false) Integer writType) { |
| | | return CommonResult.success(iWritService.page(new Page<>(size, current), new LambdaQueryWrapper<Writ>() |
| | | .eq(writType != null, Writ::getWritType, writType))); |
| | | public CommonResult search(@RequestParam Integer pageSize, |
| | | @RequestParam Integer currentPage, |
| | | @RequestParam(required = false) String keyword) { |
| | | return CommonResult.success(iWritService.selectWritPage(new Page<>(currentPage, pageSize), keyword)); |
| | | } |
| | | |
| | | @GetMapping("/query_one") |
| | | @ApiOperation(value = "查询one") |
| | | @LogSave(operationType = "文书管理", contain = "查看文书") |
| | | public CommonResult searchOne(@RequestParam Integer id) { |
| | | return CommonResult.success(iWritService.getById(id)); |
| | | public CommonResult searchOne(@RequestParam Long id) { |
| | | return CommonResult.success(iWritService.selectByCaseId(id)); |
| | | } |
| | | |
| | | @PutMapping("/modification") |
| | |
| | | return CommonResult.success(iWritService.updateById(writ)); |
| | | } |
| | | |
| | | @DeleteMapping("/delete/{id}") |
| | | @ApiOperation(value = "批量") |
| | | @LogSave(operationType = "文书管理", contain = "删除文书") |
| | | public CommonResult delete(@PathVariable Long id) { |
| | | iWritService.deleteValueByCaseId(id); |
| | | return CommonResult.success(true); |
| | | } |
| | | |
| | | @PutMapping("/deletion_batch") |
| | | @ApiOperation(value = "批量删除") |
| | | @LogSave(operationType = "文书管理", contain = "删除文书") |