Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄嘉阳
/
iot-platform-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7c2fe347
authored
Sep 18, 2023
by
李小龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fixbug
parent
f9882e1e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
8 deletions
server-service/src/main/java/com/makeit/service/saas/impl/SaasRoleServiceImpl.java
server-service/src/main/java/com/makeit/service/saas/impl/SaasUserServiceImpl.java
server-web/src/main/resources/application.yml
server-service/src/main/java/com/makeit/service/saas/impl/SaasRoleServiceImpl.java
View file @
7c2fe347
...
...
@@ -86,17 +86,23 @@ implements SaasRoleService{
}
private
void
check
(
SaasRoleDTOVO
dto
)
{
SaasRole
old
=
getOne
(
new
QueryWrapper
<
SaasRole
>().
lambda
()
List
<
SaasRole
>
oldList
=
list
(
new
QueryWrapper
<
SaasRole
>().
lambda
()
.
eq
(
SaasRole:
:
getName
,
dto
.
getName
()));
for
(
SaasRole
old
:
oldList
)
{
if
(
old
!=
null
&&
!
old
.
getId
().
equals
(
dto
.
getId
()))
{
throw
new
BusinessException
(
CodeMessageEnum
.
SYSTEM_ERROR_NAME_DUPLICATE
);
}
}
oldList
=
list
(
new
QueryWrapper
<
SaasRole
>().
lambda
()
.
eq
(
SaasRole:
:
getCode
,
dto
.
getCode
()));
for
(
SaasRole
old
:
oldList
)
{
if
(
old
!=
null
&&
!
old
.
getId
().
equals
(
dto
.
getId
()))
{
throw
new
BusinessException
(
CodeMessageEnum
.
SYSTEM_ERROR_CODE_DUPLICATE
);
}
}
// old = getOne(new QueryWrapper<SaasRole>().lambda()
// .eq(SaasRole::getName, dto.getName()));
// if (old != null && !old.getId().equals(dto.getId())) {
// throw new BusinessException(CodeMessageEnum.SYSTEM_ERROR_CODE_DUPLICATE);
// }
}
@Transactional
...
...
server-service/src/main/java/com/makeit/service/saas/impl/SaasUserServiceImpl.java
View file @
7c2fe347
...
...
@@ -186,7 +186,7 @@ implements SaasUserService{
private
void
setRoleList
(
SaasUserDTOVO
dto
)
{
saasUserRoleService
.
remove
(
new
QueryWrapper
<
SaasUserRole
>().
lambda
()
.
eq
(
SaasUserRole:
:
getUserId
,
dto
.
getId
()));
if
(
CollectionUtils
.
isNotEmpty
(
dto
.
getRoleList
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
dto
.
getRole
Id
List
()))
{
List
<
SaasUserRole
>
userRoleList
=
StreamUtil
.
map
(
dto
.
getRoleIdList
(),
e
->
{
SaasUserRole
saasUserRole
=
new
SaasUserRole
();
saasUserRole
.
setUserId
(
dto
.
getId
());
...
...
server-web/src/main/resources/application.yml
View file @
7c2fe347
...
...
@@ -82,7 +82,7 @@ mybatis-plus:
global-config
:
db-config
:
id-type
:
ASSIGN_ID
update-strategy
:
not_
empty
update-strategy
:
not_
null
insert-strategy
:
not_empty
where-strategy
:
not_empty
...
...
Write
Preview
Markdown
is supported
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