Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
李苗
/
Vion-DevOps
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0cefa4b3
authored
Nov 29, 2023
by
HlQ
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[chg] 权限修改
1 parent
c1e946f1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
7 deletions
src/main/java/vion/controller/DictionaryController.java
src/main/java/vion/controller/RRoleResourceController.java
src/main/java/vion/controller/RUserRoleController.java
src/main/java/vion/controller/TaskController.java
src/main/java/vion/controller/UserController.java
src/main/java/vion/controller/DictionaryController.java
View file @
0cefa4b
...
...
@@ -45,20 +45,20 @@ public class DictionaryController {
}
@GetMapping
(
"/dictionaryTypes"
)
@SaCheckPermission
(
"dict:type:list
"
)
@SaCheckPermission
(
value
=
"dict:type:list"
,
orRole
=
"admin
"
)
public
Page
<
DictionaryType
>
getDictionaryTypeList
(
DictionaryTypeDTO
data
)
{
return
dictionaryTypeService
.
lambdaQuery
(
converter
.
convert
(
data
,
new
DictionaryType
()))
.
page
(
Page
.
of
(
data
.
getPageNum
(),
data
.
getPageSize
()));
}
@GetMapping
(
"/dictionaryType"
)
@SaCheckPermission
(
"dict:type:query
"
)
@SaCheckPermission
(
value
=
"dict:type:query"
,
orRole
=
"admin
"
)
public
Object
getDictionaryTypeByID
(
@RequestParam
Integer
id
)
{
return
dictionaryTypeService
.
getById
(
id
);
}
@PostMapping
(
"/dictionaryType"
)
@SaCheckPermission
(
"dict:type:editAndSave
"
)
@SaCheckPermission
(
value
=
"dict:type:editAndSave"
,
orRole
=
"admin
"
)
public
String
saveOrUpdateDictionaryType
(
@RequestBody
DictionaryTypeDTO
data
)
{
DictionaryType
dictionaryType
=
converter
.
convert
(
data
,
new
DictionaryType
());
return
dictionaryTypeService
.
saveOrUpdate
(
dictionaryType
)
?
"成功"
:
"失败"
;
...
...
src/main/java/vion/controller/RRoleResourceController.java
View file @
0cefa4b
...
...
@@ -26,7 +26,7 @@ public class RRoleResourceController {
private
final
Converter
converter
;
@PostMapping
(
"/rRoleRes"
)
@SaCheckPermission
(
"role:resource:edit
"
)
@SaCheckPermission
(
value
=
"role:resource:edit"
,
orRole
=
"admin
"
)
public
String
saveOrUpdateRUserRole
(
@RequestBody
List
<
RRoleResourceDTO
>
dto
)
{
List
<
Long
>
roleIdList
=
dto
.
stream
().
map
(
RRoleResourceDTO:
:
getRoleId
).
collect
(
Collectors
.
toList
());
roleResourceService
.
lambdaUpdate
().
in
(
RRoleResource:
:
getRoleId
,
roleIdList
).
remove
();
...
...
src/main/java/vion/controller/RUserRoleController.java
View file @
0cefa4b
...
...
@@ -23,7 +23,7 @@ public class RUserRoleController {
private
final
Converter
converter
;
@PostMapping
(
"/rUserRole"
)
@SaCheckPermission
(
"user:role:edit
"
)
@SaCheckPermission
(
value
=
"user:role:edit"
,
orRole
=
"admin
"
)
public
String
saveOrUpdateRUserRole
(
@RequestBody
List
<
RUserRoleDTO
>
dto
)
{
List
<
Long
>
userIdList
=
dto
.
stream
().
map
(
RUserRoleDTO:
:
getUserId
).
collect
(
Collectors
.
toList
());
rUserRoleService
.
lambdaUpdate
().
in
(
RUserRole:
:
getUserId
,
userIdList
).
remove
();
...
...
src/main/java/vion/controller/TaskController.java
View file @
0cefa4b
...
...
@@ -42,7 +42,7 @@ public class TaskController {
}
@GetMapping
(
"/faultLogs"
)
@SaCheckPermission
(
"task:log:list
"
)
@SaCheckPermission
(
value
=
"task:log:list"
,
orRole
=
"admin
"
)
public
List
<
FaultLog
>
getFaultLogById
(
Integer
storeId
,
Integer
taskId
)
{
return
faultLogService
.
lambdaQuery
()
.
eq
(
FaultLog:
:
getStoreId
,
storeId
)
...
...
src/main/java/vion/controller/UserController.java
View file @
0cefa4b
...
...
@@ -64,7 +64,7 @@ public class UserController {
return
Opt
.
ofEmptyAble
(
data
).
map
(
userService:
:
updateBatchById
).
orElse
(
false
)
?
"更新成功"
:
"更新失败"
;
}
@GetMapping
(
"/user/{token}"
)
@SaCheckPermission
(
"user:token:query
"
)
@SaCheckPermission
(
value
=
"user:token:query"
,
orRole
=
"admin
"
)
public
UserVO
getUserByToken
(
@PathVariable
String
token
)
{
return
Global
.
USERNAME_MAP
.
get
(
token
);
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment