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
dd30e768
authored
Oct 08, 2023
by
李小龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix: 租户标识旧数据
parent
0c79878f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
server-common/src/main/java/com/makeit/module/admin/dto/plat/PlatTenantDTOVO.java
server-service/src/main/java/com/makeit/service/saas/impl/PlatTenantServiceImpl.java
server-common/src/main/java/com/makeit/module/admin/dto/plat/PlatTenantDTOVO.java
View file @
dd30e768
...
...
@@ -54,6 +54,7 @@ public class PlatTenantDTOVO extends BaseIdDTO {
@ApiModelProperty
(
value
=
"菜单id集合"
)
private
List
<
String
>
menuIdList
;
@Size
(
max
=
20
,
message
=
"租户标识最长为20字符"
)
@ApiModelProperty
(
value
=
"租户标识"
)
private
String
code
;
...
...
server-service/src/main/java/com/makeit/service/saas/impl/PlatTenantServiceImpl.java
View file @
dd30e768
...
...
@@ -431,15 +431,17 @@ public class PlatTenantServiceImpl extends ServiceImpl<PlatTenantMapper, PlatTen
private
void
checkCode
(
PlatTenantDTOVO
dto
)
{
PlatTenant
tntTenant
=
getOne
(
List
<
PlatTenant
>
list
=
list
(
new
QueryWrapper
<
PlatTenant
>().
lambda
()
.
eq
(
PlatTenant:
:
getCode
,
dto
.
getCode
())
.
ne
(
StringUtils
.
isNotBlank
(
dto
.
getId
()),
PlatTenant:
:
getId
,
dto
.
getId
())
);
if
(
tntTenant
!=
null
&&
!
tntTenant
.
getId
().
equals
(
dto
.
getId
()))
{
throw
new
BusinessException
(
CodeMessageEnum
.
SYSTEM_ERROR_TENANT_CODE_DUPLICATE
);
for
(
PlatTenant
platTenant
:
list
)
{
if
(
platTenant
!=
null
&&
!
platTenant
.
getId
().
equals
(
dto
.
getId
()))
{
throw
new
BusinessException
(
CodeMessageEnum
.
SYSTEM_ERROR_TENANT_CODE_DUPLICATE
);
}
}
}
@Override
...
...
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