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 {
...
@@ -45,20 +45,20 @@ public class DictionaryController {
}
}
@GetMapping
(
"/dictionaryTypes"
)
@GetMapping
(
"/dictionaryTypes"
)
@SaCheckPermission
(
"dict:type:list
"
)
@SaCheckPermission
(
value
=
"dict:type:list"
,
orRole
=
"admin
"
)
public
Page
<
DictionaryType
>
getDictionaryTypeList
(
DictionaryTypeDTO
data
)
{
public
Page
<
DictionaryType
>
getDictionaryTypeList
(
DictionaryTypeDTO
data
)
{
return
dictionaryTypeService
.
lambdaQuery
(
converter
.
convert
(
data
,
new
DictionaryType
()))
return
dictionaryTypeService
.
lambdaQuery
(
converter
.
convert
(
data
,
new
DictionaryType
()))
.
page
(
Page
.
of
(
data
.
getPageNum
(),
data
.
getPageSize
()));
.
page
(
Page
.
of
(
data
.
getPageNum
(),
data
.
getPageSize
()));
}
}
@GetMapping
(
"/dictionaryType"
)
@GetMapping
(
"/dictionaryType"
)
@SaCheckPermission
(
"dict:type:query
"
)
@SaCheckPermission
(
value
=
"dict:type:query"
,
orRole
=
"admin
"
)
public
Object
getDictionaryTypeByID
(
@RequestParam
Integer
id
)
{
public
Object
getDictionaryTypeByID
(
@RequestParam
Integer
id
)
{
return
dictionaryTypeService
.
getById
(
id
);
return
dictionaryTypeService
.
getById
(
id
);
}
}
@PostMapping
(
"/dictionaryType"
)
@PostMapping
(
"/dictionaryType"
)
@SaCheckPermission
(
"dict:type:editAndSave
"
)
@SaCheckPermission
(
value
=
"dict:type:editAndSave"
,
orRole
=
"admin
"
)
public
String
saveOrUpdateDictionaryType
(
@RequestBody
DictionaryTypeDTO
data
)
{
public
String
saveOrUpdateDictionaryType
(
@RequestBody
DictionaryTypeDTO
data
)
{
DictionaryType
dictionaryType
=
converter
.
convert
(
data
,
new
DictionaryType
());
DictionaryType
dictionaryType
=
converter
.
convert
(
data
,
new
DictionaryType
());
return
dictionaryTypeService
.
saveOrUpdate
(
dictionaryType
)
?
"成功"
:
"失败"
;
return
dictionaryTypeService
.
saveOrUpdate
(
dictionaryType
)
?
"成功"
:
"失败"
;
...
...
src/main/java/vion/controller/RRoleResourceController.java
View file @
0cefa4b
...
@@ -26,7 +26,7 @@ public class RRoleResourceController {
...
@@ -26,7 +26,7 @@ public class RRoleResourceController {
private
final
Converter
converter
;
private
final
Converter
converter
;
@PostMapping
(
"/rRoleRes"
)
@PostMapping
(
"/rRoleRes"
)
@SaCheckPermission
(
"role:resource:edit
"
)
@SaCheckPermission
(
value
=
"role:resource:edit"
,
orRole
=
"admin
"
)
public
String
saveOrUpdateRUserRole
(
@RequestBody
List
<
RRoleResourceDTO
>
dto
)
{
public
String
saveOrUpdateRUserRole
(
@RequestBody
List
<
RRoleResourceDTO
>
dto
)
{
List
<
Long
>
roleIdList
=
dto
.
stream
().
map
(
RRoleResourceDTO:
:
getRoleId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
roleIdList
=
dto
.
stream
().
map
(
RRoleResourceDTO:
:
getRoleId
).
collect
(
Collectors
.
toList
());
roleResourceService
.
lambdaUpdate
().
in
(
RRoleResource:
:
getRoleId
,
roleIdList
).
remove
();
roleResourceService
.
lambdaUpdate
().
in
(
RRoleResource:
:
getRoleId
,
roleIdList
).
remove
();
...
...
src/main/java/vion/controller/RUserRoleController.java
View file @
0cefa4b
...
@@ -23,7 +23,7 @@ public class RUserRoleController {
...
@@ -23,7 +23,7 @@ public class RUserRoleController {
private
final
Converter
converter
;
private
final
Converter
converter
;
@PostMapping
(
"/rUserRole"
)
@PostMapping
(
"/rUserRole"
)
@SaCheckPermission
(
"user:role:edit
"
)
@SaCheckPermission
(
value
=
"user:role:edit"
,
orRole
=
"admin
"
)
public
String
saveOrUpdateRUserRole
(
@RequestBody
List
<
RUserRoleDTO
>
dto
)
{
public
String
saveOrUpdateRUserRole
(
@RequestBody
List
<
RUserRoleDTO
>
dto
)
{
List
<
Long
>
userIdList
=
dto
.
stream
().
map
(
RUserRoleDTO:
:
getUserId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
userIdList
=
dto
.
stream
().
map
(
RUserRoleDTO:
:
getUserId
).
collect
(
Collectors
.
toList
());
rUserRoleService
.
lambdaUpdate
().
in
(
RUserRole:
:
getUserId
,
userIdList
).
remove
();
rUserRoleService
.
lambdaUpdate
().
in
(
RUserRole:
:
getUserId
,
userIdList
).
remove
();
...
...
src/main/java/vion/controller/TaskController.java
View file @
0cefa4b
...
@@ -42,7 +42,7 @@ public class TaskController {
...
@@ -42,7 +42,7 @@ public class TaskController {
}
}
@GetMapping
(
"/faultLogs"
)
@GetMapping
(
"/faultLogs"
)
@SaCheckPermission
(
"task:log:list
"
)
@SaCheckPermission
(
value
=
"task:log:list"
,
orRole
=
"admin
"
)
public
List
<
FaultLog
>
getFaultLogById
(
Integer
storeId
,
Integer
taskId
)
{
public
List
<
FaultLog
>
getFaultLogById
(
Integer
storeId
,
Integer
taskId
)
{
return
faultLogService
.
lambdaQuery
()
return
faultLogService
.
lambdaQuery
()
.
eq
(
FaultLog:
:
getStoreId
,
storeId
)
.
eq
(
FaultLog:
:
getStoreId
,
storeId
)
...
...
src/main/java/vion/controller/UserController.java
View file @
0cefa4b
...
@@ -64,7 +64,7 @@ public class UserController {
...
@@ -64,7 +64,7 @@ public class UserController {
return
Opt
.
ofEmptyAble
(
data
).
map
(
userService:
:
updateBatchById
).
orElse
(
false
)
?
"更新成功"
:
"更新失败"
;
return
Opt
.
ofEmptyAble
(
data
).
map
(
userService:
:
updateBatchById
).
orElse
(
false
)
?
"更新成功"
:
"更新失败"
;
}
}
@GetMapping
(
"/user/{token}"
)
@GetMapping
(
"/user/{token}"
)
@SaCheckPermission
(
"user:token:query
"
)
@SaCheckPermission
(
value
=
"user:token:query"
,
orRole
=
"admin
"
)
public
UserVO
getUserByToken
(
@PathVariable
String
token
)
{
public
UserVO
getUserByToken
(
@PathVariable
String
token
)
{
return
Global
.
USERNAME_MAP
.
get
(
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