Commit e1366ee4 authored by dqjdda's avatar dqjdda
Browse files

菜单修改

parent cad0c08c
...@@ -30,21 +30,21 @@ public class LocalStorageController { ...@@ -30,21 +30,21 @@ public class LocalStorageController {
@ApiOperation("查询文件") @ApiOperation("查询文件")
@GetMapping @GetMapping
@PreAuthorize("hasAnyRole('ADMIN','LOCALSTORAGE_ALL','LOCALSTORAGE_SELECT')") @PreAuthorize("hasAnyRole('admin','LOCALSTORAGE_ALL','LOCALSTORAGE_SELECT')")
public ResponseEntity getLocalStorages(LocalStorageQueryCriteria criteria, Pageable pageable){ public ResponseEntity getLocalStorages(LocalStorageQueryCriteria criteria, Pageable pageable){
return new ResponseEntity<>(localStorageService.queryAll(criteria,pageable),HttpStatus.OK); return new ResponseEntity<>(localStorageService.queryAll(criteria,pageable),HttpStatus.OK);
} }
@ApiOperation("上传文件") @ApiOperation("上传文件")
@PostMapping @PostMapping
@PreAuthorize("hasAnyRole('ADMIN','LOCALSTORAGE_ALL','LOCALSTORAGE_CREATE')") @PreAuthorize("hasAnyRole('admin','LOCALSTORAGE_ALL','LOCALSTORAGE_CREATE')")
public ResponseEntity create(@RequestParam String name, @RequestParam("file") MultipartFile file){ public ResponseEntity create(@RequestParam String name, @RequestParam("file") MultipartFile file){
return new ResponseEntity<>(localStorageService.create(name, file),HttpStatus.CREATED); return new ResponseEntity<>(localStorageService.create(name, file),HttpStatus.CREATED);
} }
@ApiOperation("修改文件") @ApiOperation("修改文件")
@PutMapping @PutMapping
@PreAuthorize("hasAnyRole('ADMIN','LOCALSTORAGE_ALL','LOCALSTORAGE_EDIT')") @PreAuthorize("hasAnyRole('admin','LOCALSTORAGE_ALL','LOCALSTORAGE_EDIT')")
public ResponseEntity update(@Validated @RequestBody LocalStorage resources){ public ResponseEntity update(@Validated @RequestBody LocalStorage resources){
localStorageService.update(resources); localStorageService.update(resources);
return new ResponseEntity(HttpStatus.NO_CONTENT); return new ResponseEntity(HttpStatus.NO_CONTENT);
...@@ -52,7 +52,7 @@ public class LocalStorageController { ...@@ -52,7 +52,7 @@ public class LocalStorageController {
@ApiOperation("删除文件") @ApiOperation("删除文件")
@DeleteMapping(value = "/{id}") @DeleteMapping(value = "/{id}")
@PreAuthorize("hasAnyRole('ADMIN','LOCALSTORAGE_ALL','LOCALSTORAGE_DELETE')") @PreAuthorize("hasAnyRole('admin','LOCALSTORAGE_ALL','LOCALSTORAGE_DELETE')")
public ResponseEntity delete(@PathVariable Long id){ public ResponseEntity delete(@PathVariable Long id){
localStorageService.delete(id); localStorageService.delete(id);
return new ResponseEntity(HttpStatus.OK); return new ResponseEntity(HttpStatus.OK);
......
...@@ -32,7 +32,7 @@ public class PictureController { ...@@ -32,7 +32,7 @@ public class PictureController {
} }
@Log("查询图片") @Log("查询图片")
@PreAuthorize("hasAnyRole('ADMIN','PICTURE_ALL','PICTURE_SELECT')") @PreAuthorize("hasAnyRole('admin','PICTURE_ALL','PICTURE_SELECT')")
@GetMapping @GetMapping
@ApiOperation("查询图片") @ApiOperation("查询图片")
public ResponseEntity getRoles(PictureQueryCriteria criteria, Pageable pageable){ public ResponseEntity getRoles(PictureQueryCriteria criteria, Pageable pageable){
...@@ -40,7 +40,7 @@ public class PictureController { ...@@ -40,7 +40,7 @@ public class PictureController {
} }
@Log("上传图片") @Log("上传图片")
@PreAuthorize("hasAnyRole('ADMIN','PICTURE_ALL','PICTURE_UPLOAD')") @PreAuthorize("hasAnyRole('admin','PICTURE_ALL','PICTURE_UPLOAD')")
@PostMapping @PostMapping
@ApiOperation("上传图片") @ApiOperation("上传图片")
public ResponseEntity upload(@RequestParam MultipartFile file){ public ResponseEntity upload(@RequestParam MultipartFile file){
...@@ -55,7 +55,7 @@ public class PictureController { ...@@ -55,7 +55,7 @@ public class PictureController {
@Log("删除图片") @Log("删除图片")
@ApiOperation("删除图片") @ApiOperation("删除图片")
@PreAuthorize("hasAnyRole('ADMIN','PICTURE_ALL','PICTURE_DELETE')") @PreAuthorize("hasAnyRole('admin','PICTURE_ALL','PICTURE_DELETE')")
@DeleteMapping(value = "/{id}") @DeleteMapping(value = "/{id}")
public ResponseEntity delete(@PathVariable Long id) { public ResponseEntity delete(@PathVariable Long id) {
pictureService.delete(pictureService.findById(id)); pictureService.delete(pictureService.findById(id));
...@@ -64,7 +64,7 @@ public class PictureController { ...@@ -64,7 +64,7 @@ public class PictureController {
@Log("多选删除图片") @Log("多选删除图片")
@ApiOperation("多选删除图片") @ApiOperation("多选删除图片")
@PreAuthorize("hasAnyRole('ADMIN','PICTURE_ALL','PICTURE_DELETE')") @PreAuthorize("hasAnyRole('admin','PICTURE_ALL','PICTURE_DELETE')")
@DeleteMapping @DeleteMapping
public ResponseEntity deleteAll(@RequestBody Long[] ids) { public ResponseEntity deleteAll(@RequestBody Long[] ids) {
pictureService.deleteAll(ids); pictureService.deleteAll(ids);
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment