| | |
| | | @RestController |
| | | @RequiredArgsConstructor |
| | | @Api(tags = "合同部分管理") |
| | | @RequestMapping("/api/sysContract") |
| | | @RequestMapping("/api/sysUserContract") |
| | | public class SysUserContractController { |
| | | |
| | | private final SysUserContractService sysUserContractService; |
| | |
| | | @Log("导出数据") |
| | | @ApiOperation("导出数据") |
| | | @GetMapping(value = "/download") |
| | | @PreAuthorize("@el.check('sysContract:list')") |
| | | @PreAuthorize("@el.check('sysUserContract:list')") |
| | | public void exportSysContract(HttpServletResponse response, SysUserContractQueryCriteria criteria) throws IOException { |
| | | sysUserContractService.download(sysUserContractService.queryAll(criteria), response); |
| | | } |
| | |
| | | @GetMapping |
| | | @Log("查询合同部分") |
| | | @ApiOperation("查询合同部分") |
| | | @PreAuthorize("@el.check('sysContract:list')") |
| | | @PreAuthorize("@el.check('sysUserContract:list')") |
| | | public ResponseEntity<Object> querySysContract(SysUserContractQueryCriteria criteria, Pageable pageable){ |
| | | return new ResponseEntity<>(sysUserContractService.queryAll(criteria,pageable),HttpStatus.OK); |
| | | } |
| | |
| | | @GetMapping(value = "/all") |
| | | @Log("查询合同部分") |
| | | @ApiOperation("查询合同部分") |
| | | @PreAuthorize("@el.check('sysContract:list')") |
| | | @PreAuthorize("@el.check('sysUserContract:list')") |
| | | public ResponseEntity<Object> querySysContract(SysUserContractQueryCriteria criteria){ |
| | | return new ResponseEntity<>(sysUserContractService.queryAll(criteria),HttpStatus.OK); |
| | | } |
| | |
| | | @PostMapping |
| | | @Log("新增合同部分") |
| | | @ApiOperation("新增合同部分") |
| | | @PreAuthorize("@el.check('sysContract:add')") |
| | | @PreAuthorize("@el.check('sysUserContract:add')") |
| | | public ResponseEntity<Object> createSysContract(@Validated @RequestBody SysUserContract resources){ |
| | | return new ResponseEntity<>(sysUserContractService.create(resources),HttpStatus.CREATED); |
| | | } |
| | |
| | | @PutMapping |
| | | @Log("修改合同部分") |
| | | @ApiOperation("修改合同部分") |
| | | @PreAuthorize("@el.check('sysContract:edit')") |
| | | @PreAuthorize("@el.check('sysUserContract:edit')") |
| | | public ResponseEntity<Object> updateSysContract(@Validated @RequestBody SysUserContract resources){ |
| | | sysUserContractService.update(resources); |
| | | return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
| | |
| | | @DeleteMapping |
| | | @Log("删除合同部分") |
| | | @ApiOperation("删除合同部分") |
| | | @PreAuthorize("@el.check('sysContract:del')") |
| | | @PreAuthorize("@el.check('sysUserContract:del')") |
| | | public ResponseEntity<Object> deleteSysContract(@RequestBody Long[] ids) { |
| | | sysUserContractService.deleteAll(ids); |
| | | return new ResponseEntity<>(HttpStatus.OK); |