Fix can not remove expiration and credentialsExpiration from user bug

This commit is contained in:
2023-12-22 15:42:09 +08:00
parent c40bb0bbaa
commit 660f879ccd

View File

@@ -84,7 +84,12 @@ class UserServiceImpl(
PageUtil.setPageSort(userGetParam, userIdsPage, OrderItem.asc("id"))
val userIdsIPage =
baseMapper.selectPage(userIdsPage,userGetParam?.searchType ?: "ALL", userGetParam?.searchValue, userGetParam?.searchRegex ?: false)
baseMapper.selectPage(
userIdsPage,
userGetParam?.searchType ?: "ALL",
userGetParam?.searchValue,
userGetParam?.searchRegex ?: false
)
val userPage = Page<User>(userIdsIPage.current, userIdsIPage.size, userIdsIPage.total)
if (userIdsIPage.total > 0) {
userPage.setRecords(baseMapper.selectListWithRoleInfoByIds(userIdsIPage.records))
@@ -171,6 +176,10 @@ class UserServiceImpl(
oldGroupList.toSet().let { addGroupIds.removeAll(it) }
baseMapper.updateById(user)
baseMapper.update(
KtUpdateWrapper(User()).eq(User::id, user.id).set(User::expiration, user.expiration)
.set(User::credentialsExpiration, user.credentialsExpiration)
)
user.userInfo?.let { userInfo ->
userInfoService.getOne(