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
d7291709
authored
Sep 27, 2023
by
李小龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix:
parent
2bb455bd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
9 deletions
server-common/src/main/java/com/makeit/module/admin/dto/saas/SaasRoleDTOVO.java
server-service/src/main/java/com/makeit/service/platform/device/impl/PlatDeviceServiceImpl.java
server-service/src/main/java/com/makeit/service/saas/impl/SaasRoleServiceImpl.java
server-common/src/main/java/com/makeit/module/admin/dto/saas/SaasRoleDTOVO.java
View file @
d7291709
...
@@ -22,7 +22,7 @@ public class SaasRoleDTOVO extends BaseIdDTO implements Serializable {
...
@@ -22,7 +22,7 @@ public class SaasRoleDTOVO extends BaseIdDTO implements Serializable {
@ApiModelProperty
(
value
=
"名称"
)
@ApiModelProperty
(
value
=
"名称"
)
private
String
name
;
private
String
name
;
@NotBlank
(
message
=
"编码不能为空"
)
//
@NotBlank(message = "编码不能为空")
@Size
(
max
=
64
,
message
=
"编码最长为64字符"
)
@Size
(
max
=
64
,
message
=
"编码最长为64字符"
)
@Pattern
(
regexp
=
"[a-zA-Z0-9]{0,64}"
,
message
=
"编码只能为大小写英文字符和数字"
)
@Pattern
(
regexp
=
"[a-zA-Z0-9]{0,64}"
,
message
=
"编码只能为大小写英文字符和数字"
)
@ApiModelProperty
(
value
=
"编码"
)
@ApiModelProperty
(
value
=
"编码"
)
...
...
server-service/src/main/java/com/makeit/service/platform/device/impl/PlatDeviceServiceImpl.java
View file @
d7291709
...
@@ -83,7 +83,9 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
...
@@ -83,7 +83,9 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
.
eq
(
StringUtils
.
isNotBlank
(
dto
.
getStatus
()),
PlatDevice:
:
getStatus
,
dto
.
getStatus
())
.
eq
(
StringUtils
.
isNotBlank
(
dto
.
getStatus
()),
PlatDevice:
:
getStatus
,
dto
.
getStatus
())
.
like
(
StringUtils
.
isNotBlank
(
dto
.
getProductName
()),
PlatDevice:
:
getProductName
,
dto
.
getProductName
())
.
like
(
StringUtils
.
isNotBlank
(
dto
.
getProductName
()),
PlatDevice:
:
getProductName
,
dto
.
getProductName
())
.
eq
(
StringUtils
.
isNotBlank
(
dto
.
getProductId
()),
PlatDevice:
:
getProductId
,
dto
.
getProductId
())
.
eq
(
StringUtils
.
isNotBlank
(
dto
.
getProductId
()),
PlatDevice:
:
getProductId
,
dto
.
getProductId
())
.
apply
(
StringUtils
.
isNotBlank
(
dto
.
getOrgId
()),
"find_in_set('"
+
dto
.
getOrgId
()
+
"',org_path)"
)
.
eq
(
StringUtils
.
isNotBlank
(
dto
.
getOrgId
()),
PlatDevice:
:
getOrgId
,
dto
.
getOrgId
())
// .apply(StringUtils.isNotBlank(dto.getOrgId()), "find_in_set('" + dto.getOrgId() + "',org_path)")
.
orderByDesc
(
BaseEntity:
:
getUpdateDate
)
);
);
List
<
PlatDeviceListVO
>
voList
=
BeanDtoVoUtils
.
listVo
(
page
.
getRecords
(),
PlatDeviceListVO
.
class
);
List
<
PlatDeviceListVO
>
voList
=
BeanDtoVoUtils
.
listVo
(
page
.
getRecords
(),
PlatDeviceListVO
.
class
);
...
...
server-service/src/main/java/com/makeit/service/saas/impl/SaasRoleServiceImpl.java
View file @
d7291709
...
@@ -95,13 +95,13 @@ implements SaasRoleService{
...
@@ -95,13 +95,13 @@ implements SaasRoleService{
}
}
oldList
=
list
(
new
QueryWrapper
<
SaasRole
>().
lambda
()
//
oldList = list(new QueryWrapper<SaasRole>().lambda()
.
eq
(
SaasRole:
:
getCode
,
dto
.
getCode
()));
//
.eq(SaasRole::getCode, dto.getCode()));
for
(
SaasRole
old
:
oldList
)
{
//
for (SaasRole old : oldList) {
if
(
old
!=
null
&&
!
old
.
getId
().
equals
(
dto
.
getId
()))
{
//
if (old != null && !old.getId().equals(dto.getId())) {
throw
new
BusinessException
(
CodeMessageEnum
.
SYSTEM_ERROR_CODE_DUPLICATE
);
//
throw new BusinessException(CodeMessageEnum.SYSTEM_ERROR_CODE_DUPLICATE);
}
//
}
}
//
}
}
}
...
...
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