| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author 江蹄蹄 |
| | | * @since 2024/04/28 16:06 |
| | |
| | | @PostMapping("/create") |
| | | @CloudRequiredPermission("business:platformgroup:create") |
| | | public ApiResponse create(@RequestBody PlatformGroup platformGroup,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | platformGroup.setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(platformGroupService.create(platformGroup)); |
| | | } |
| | | |
| | |
| | | @GetMapping("/delete/{id}") |
| | | @CloudRequiredPermission("business:platformgroup:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | platformGroupService.deleteById(id); |
| | | platformGroupService.deleteById(id,this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | @GetMapping("/delete/batch") |
| | | @CloudRequiredPermission("business:platformgroup:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | platformGroupService.deleteByIdInBatch(this.getIdList(ids)); |
| | | platformGroupService.deleteByIdInBatch(this.getIdList(ids),this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | @PostMapping("/updateById") |
| | | @CloudRequiredPermission("business:platformgroup:update") |
| | | public ApiResponse updateById(@RequestBody PlatformGroup platformGroup,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | platformGroup.setLoginUserInfo(this.getLoginUser(token)); |
| | | platformGroupService.updateById(platformGroup); |
| | | return ApiResponse.success(null); |
| | | } |
| | |
| | | @PostMapping("/page") |
| | | @CloudRequiredPermission("business:platformgroup:query") |
| | | public ApiResponse<PageData<PlatformGroup>> findPage (@RequestBody PageWrap<PlatformGroup> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | pageWrap.getModel().setIsdeleted(Constants.ZERO); |
| | | return ApiResponse.success(platformGroupService.findPage(pageWrap)); |
| | | } |
| | | @ApiOperation("查询列表") |
| | | @PostMapping("/list") |
| | | @CloudRequiredPermission("business:platformgroup:query") |
| | | public ApiResponse<List<PlatformGroup>> list (@RequestBody PlatformGroup pageWrap, @RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | pageWrap.setIsdeleted(Constants.ZERO); |
| | | return ApiResponse.success(platformGroupService.findList(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导出Excel") |
| | | @PostMapping("/exportExcel") |