| | |
| | | @PreventRepeat |
| | | @ApiOperation("新建") |
| | | @PostMapping("/create") |
| | | //@RequiresPermissions("business:devicerole:create") |
| | | @RequiresPermissions("business:devicerole:create") |
| | | public ApiResponse create(@RequestBody DeviceRole deviceRole) { |
| | | return ApiResponse.success(deviceRoleService.create(deviceRole)); |
| | | } |
| | | |
| | | @ApiOperation("根据ID删除") |
| | | @GetMapping("/delete/{id}") |
| | | //@RequiresPermissions("business:devicerole:delete") |
| | | @RequiresPermissions("business:devicerole:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | deviceRoleService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | |
| | | |
| | | @ApiOperation("批量删除") |
| | | @GetMapping("/delete/batch") |
| | | //@RequiresPermissions("business:devicerole:delete") |
| | | @RequiresPermissions("business:devicerole:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | |
| | | |
| | | @ApiOperation("根据ID修改") |
| | | @PostMapping("/updateById") |
| | | //@RequiresPermissions("business:devicerole:update") |
| | | @RequiresPermissions("business:devicerole:update") |
| | | public ApiResponse updateById(@RequestBody DeviceRole deviceRole) { |
| | | deviceRoleService.updateById(deviceRole); |
| | | return ApiResponse.success(null); |
| | |
| | | |
| | | @ApiOperation("根据ID修改默认门禁组状态") |
| | | @PostMapping("/updateStatusById") |
| | | //@RequiresPermissions("business:devicerole:update") |
| | | @RequiresPermissions("business:devicerole:update") |
| | | public ApiResponse updateStatusById(@RequestBody DeviceRole deviceRole) { |
| | | deviceRoleService.updateStatusById(deviceRole); |
| | | return ApiResponse.success(null); |
| | | } |
| | | @ApiOperation("默认下发门禁组角色") |
| | | @PostMapping("/updateMemberRole") |
| | | public ApiResponse updateMemberRole(@RequestBody DeviceRole deviceRole) { |
| | | deviceRoleService.updateMemberRole(deviceRole); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("分页查询") |
| | | @PostMapping("/page") |
| | | //@RequiresPermissions("business:devicerole:query") |
| | | @RequiresPermissions("business:devicerole:query") |
| | | public ApiResponse<PageData<DeviceRole>> findPage (@RequestBody PageWrap<DeviceRole> pageWrap) { |
| | | return ApiResponse.success(deviceRoleService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导出Excel") |
| | | @PostMapping("/exportExcel") |
| | | //@RequiresPermissions("business:devicerole:exportExcel") |
| | | @RequiresPermissions("business:devicerole:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<DeviceRole> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(DeviceRole.class).export(deviceRoleService.findPage(pageWrap).getRecords(), "门禁角色信息表", response); |
| | | } |