Optimize search in user management api

This commit is contained in:
2023-11-30 09:49:09 +08:00
parent c474f1c679
commit 4bd749ff37
4 changed files with 64 additions and 7 deletions

View File

@@ -66,7 +66,7 @@ class UserServiceImpl(
PageUtil.setPageSort(userGetParam, userIdsPage, OrderItem.asc("id"))
val userIdsIPage =
baseMapper.selectPage(userIdsPage, 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))