|  |  |  | 
|---|
|  |  |  | @ApiOperation("新建") | 
|---|
|  |  |  | @PostMapping("/create") | 
|---|
|  |  |  | @CloudRequiredPermission("business:rooms:create") | 
|---|
|  |  |  | public ApiResponse create(@RequestBody Rooms rooms) { | 
|---|
|  |  |  | public ApiResponse create(@RequestBody Rooms rooms,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
|---|
|  |  |  | rooms.setLoginUserInfo(this.getLoginUser(token)); | 
|---|
|  |  |  | return ApiResponse.success(roomsService.create(rooms)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("根据ID删除") | 
|---|
|  |  |  | @GetMapping("/delete/{id}") | 
|---|
|  |  |  | @CloudRequiredPermission("business:rooms:delete") | 
|---|
|  |  |  | public ApiResponse deleteById(@PathVariable Integer id) { | 
|---|
|  |  |  | public ApiResponse deleteById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
|---|
|  |  |  | roomsService.deleteById(id); | 
|---|
|  |  |  | return ApiResponse.success(null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiOperation("批量删除") | 
|---|
|  |  |  | @GetMapping("/delete/batch") | 
|---|
|  |  |  | @CloudRequiredPermission("business:rooms:delete") | 
|---|
|  |  |  | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { | 
|---|
|  |  |  | public ApiResponse deleteByIdInBatch(@RequestParam String ids,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
|---|
|  |  |  | String [] idArray = ids.split(","); | 
|---|
|  |  |  | List<Integer> idList = new ArrayList<>(); | 
|---|
|  |  |  | for (String id : idArray) { | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiOperation("根据ID修改") | 
|---|
|  |  |  | @PostMapping("/updateById") | 
|---|
|  |  |  | @CloudRequiredPermission("business:rooms:update") | 
|---|
|  |  |  | public ApiResponse updateById(@RequestBody Rooms rooms) { | 
|---|
|  |  |  | public ApiResponse updateById(@RequestBody Rooms rooms,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
|---|
|  |  |  | rooms.setLoginUserInfo(this.getLoginUser(token)); | 
|---|
|  |  |  | roomsService.updateById(rooms); | 
|---|
|  |  |  | return ApiResponse.success(null); | 
|---|
|  |  |  | } | 
|---|