Commit e1366ee4 authored by dqjdda's avatar dqjdda
Browse files

菜单修改

parent cad0c08c
......@@ -30,21 +30,21 @@ public class LocalStorageController {
@ApiOperation("查询文件")
@GetMapping
@PreAuthorize("hasAnyRole('ADMIN','LOCALSTORAGE_ALL','LOCALSTORAGE_SELECT')")
@PreAuthorize("hasAnyRole('admin','LOCALSTORAGE_ALL','LOCALSTORAGE_SELECT')")
public ResponseEntity getLocalStorages(LocalStorageQueryCriteria criteria, Pageable pageable){
return new ResponseEntity<>(localStorageService.queryAll(criteria,pageable),HttpStatus.OK);
}
@ApiOperation("上传文件")
@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){
return new ResponseEntity<>(localStorageService.create(name, file),HttpStatus.CREATED);
}
@ApiOperation("修改文件")
@PutMapping
@PreAuthorize("hasAnyRole('ADMIN','LOCALSTORAGE_ALL','LOCALSTORAGE_EDIT')")
@PreAuthorize("hasAnyRole('admin','LOCALSTORAGE_ALL','LOCALSTORAGE_EDIT')")
public ResponseEntity update(@Validated @RequestBody LocalStorage resources){
localStorageService.update(resources);
return new ResponseEntity(HttpStatus.NO_CONTENT);
......@@ -52,7 +52,7 @@ public class LocalStorageController {
@ApiOperation("删除文件")
@DeleteMapping(value = "/{id}")
@PreAuthorize("hasAnyRole('ADMIN','LOCALSTORAGE_ALL','LOCALSTORAGE_DELETE')")
@PreAuthorize("hasAnyRole('admin','LOCALSTORAGE_ALL','LOCALSTORAGE_DELETE')")
public ResponseEntity delete(@PathVariable Long id){
localStorageService.delete(id);
return new ResponseEntity(HttpStatus.OK);
......
......@@ -32,7 +32,7 @@ public class PictureController {
}
@Log("查询图片")
@PreAuthorize("hasAnyRole('ADMIN','PICTURE_ALL','PICTURE_SELECT')")
@PreAuthorize("hasAnyRole('admin','PICTURE_ALL','PICTURE_SELECT')")
@GetMapping
@ApiOperation("查询图片")
public ResponseEntity getRoles(PictureQueryCriteria criteria, Pageable pageable){
......@@ -40,7 +40,7 @@ public class PictureController {
}
@Log("上传图片")
@PreAuthorize("hasAnyRole('ADMIN','PICTURE_ALL','PICTURE_UPLOAD')")
@PreAuthorize("hasAnyRole('admin','PICTURE_ALL','PICTURE_UPLOAD')")
@PostMapping
@ApiOperation("上传图片")
public ResponseEntity upload(@RequestParam MultipartFile file){
......@@ -55,7 +55,7 @@ public class PictureController {
@Log("删除图片")
@ApiOperation("删除图片")
@PreAuthorize("hasAnyRole('ADMIN','PICTURE_ALL','PICTURE_DELETE')")
@PreAuthorize("hasAnyRole('admin','PICTURE_ALL','PICTURE_DELETE')")
@DeleteMapping(value = "/{id}")
public ResponseEntity delete(@PathVariable Long id) {
pictureService.delete(pictureService.findById(id));
......@@ -64,7 +64,7 @@ public class PictureController {
@Log("多选删除图片")
@ApiOperation("多选删除图片")
@PreAuthorize("hasAnyRole('ADMIN','PICTURE_ALL','PICTURE_DELETE')")
@PreAuthorize("hasAnyRole('admin','PICTURE_ALL','PICTURE_DELETE')")
@DeleteMapping
public ResponseEntity deleteAll(@RequestBody Long[] 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