Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Eladmin
Commits
e1366ee4
Commit
e1366ee4
authored
Oct 29, 2019
by
dqjdda
Browse files
菜单修改
parent
cad0c08c
Changes
23
Expand all
Hide whitespace changes
Inline
Side-by-side
eladmin-tools/src/main/java/me/zhengjie/rest/LocalStorageController.java
View file @
e1366ee4
...
...
@@ -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
);
...
...
eladmin-tools/src/main/java/me/zhengjie/rest/PictureController.java
View file @
e1366ee4
...
...
@@ -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
);
...
...
sql/eladmin.sql
deleted
100644 → 0
View file @
cad0c08c
This diff is collapsed.
Click to expand it.
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment