| | |
| | | @PostMapping("/create") |
| | | @CloudRequiredPermission("business:cars:create") |
| | | public ApiResponse create(@RequestBody Cars cars,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | cars.setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(carsService.create(cars)); |
| | | } |
| | | |
| | |
| | | @GetMapping("/delete/{id}") |
| | | @CloudRequiredPermission("business:cars:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | carsService.deleteById(id); |
| | | carsService.deleteById(id,this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | carsService.deleteByIdInBatch(idList); |
| | | carsService.deleteByIdInBatch(idList,this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | @PostMapping("/updateById") |
| | | @CloudRequiredPermission("business:cars:update") |
| | | public ApiResponse updateById(@RequestBody Cars cars,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | cars.setLoginUserInfo(this.getLoginUser(token)); |
| | | carsService.updateById(cars); |
| | | return ApiResponse.success(null); |
| | | } |
| | |
| | | return ApiResponse.success(carsService.findPage(pageWrap)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("列表查询") |
| | | @PostMapping("/list") |
| | | @CloudRequiredPermission("business:cars:query") |
| | | public ApiResponse<List<Cars>> findList (@RequestBody Cars cars,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | return ApiResponse.success(carsService.findList(cars)); |
| | | } |
| | | |
| | | @ApiOperation("导出Excel") |
| | | @PostMapping("/exportExcel") |
| | | @CloudRequiredPermission("business:cars:exportExcel") |