| | |
| | | * @date ${date} |
| | | * @since JDK1.8 |
| | | */ |
| | | @Api(tags = "${tableComment}管理接口") |
| | | @Slf4j |
| | | @Validated |
| | | @RestController |
| | |
| | | |
| | | private final I${className}Service ${className?uncap_first}Service; |
| | | |
| | | @ApiOperation(value = "${tableComment}无翻页列表") |
| | | @GetMapping |
| | | @PreAuthorize("hasAuthority('${className?uncap_first}:list')") |
| | | public FebsResponse getAll${className}s(${className} ${className?uncap_first}) { |
| | | return new FebsResponse().data(${className?uncap_first}Service.find${className}s(${className?uncap_first})); |
| | | } |
| | | |
| | | @ApiOperation(value = "${tableComment}翻页列表") |
| | | @GetMapping("list") |
| | | @PreAuthorize("hasAuthority('${className?uncap_first}:list')") |
| | | public FebsResponse ${className?uncap_first}List(QueryRequest request, ${className} ${className?uncap_first}) { |
| | | Map<String, Object> dataTable = FebsUtil.getDataTable(this.${className?uncap_first}Service.find${className}s(request, ${className?uncap_first})); |
| | | Map |
| | | <String, Object> dataTable = FebsUtil.getDataTable(this.${className?uncap_first}Service.find${className}s(request, ${className?uncap_first})); |
| | | return new FebsResponse().data(dataTable); |
| | | } |
| | | |
| | | @ApiOperation(value = "${tableComment}增加") |
| | | @PostMapping |
| | | @PreAuthorize("hasAuthority('${className?uncap_first}:add')") |
| | | public void add${className}(@Valid ${className} ${className?uncap_first}) throws FebsException { |
| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "${tableComment}物理删除") |
| | | @DeleteMapping |
| | | @PreAuthorize("hasAuthority('${className?uncap_first}:delete')") |
| | | public void delete${className}(${className} ${className?uncap_first}) throws FebsException { |
| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "${tableComment}逻辑删除") |
| | | @DeleteMapping("{ids}") |
| | | @PreAuthorize("hasAuthority('${className?uncap_first}:delete')") |
| | | public void logicDelete${className}(@PathVariable("ids") String ids) throws FebsException { |
| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "${tableComment}修改") |
| | | @PutMapping |
| | | @PreAuthorize("hasAuthority('${className?uncap_first}:update')") |
| | | public void update${className}(${className} ${className?uncap_first}) throws FebsException { |