Skip to content

Commit

Permalink
feat:环境管理-节点支持按照关键字搜索 TencentBlueKing#10208
Browse files Browse the repository at this point in the history
  • Loading branch information
jianingzhao616 committed Apr 12, 2024
1 parent 14d34ff commit d46bd56
Showing 1 changed file with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,15 @@ class NodeService @Autowired constructor(
if (-1 != page) {
val sqlLimit = PageUtil.convertPageSizeToSQLLimit(page ?: 1, pageSize ?: 20)
nodeDao.listNodesWithPageLimitAndSearchCondition(
dslContext, projectId, sqlLimit.limit, sqlLimit.offset,
nodeIp, displayName, createdUser, lastModifiedUser, keywords
dslContext = dslContext,
projectId = projectId,
limit = sqlLimit.limit,
offset = sqlLimit.offset,
nodeIp = nodeIp,
displayName = displayName,
createdUser = createdUser,
lastModifiedUser = lastModifiedUser,
keywords = keywords
)
} else {
nodeDao.listNodes(dslContext, projectId)
Expand All @@ -195,7 +202,13 @@ class NodeService @Autowired constructor(
return Page(1, 0, 0, emptyList())
}
val count = nodeDao.countForAuthWithSearchCondition(
dslContext, projectId, nodeIp, displayName, createdUser, lastModifiedUser, keywords
dslContext = dslContext,
projectId = projectId,
nodeIp = nodeIp,
displayName = displayName,
createdUser = createdUser,
lastModifiedUser = lastModifiedUser,
keywords = keywords
).toLong()
return Page(
page = page ?: 1,
Expand Down

0 comments on commit d46bd56

Please sign in to comment.