Fix(Store): Fix incorrect item count
Fixed incorrect item count when specifying platform
This commit is contained in:
@@ -27,7 +27,11 @@ interface StoreMapper : BaseMapper<Tool> {
|
||||
* @since 1.0.0
|
||||
* @see IPage
|
||||
*/
|
||||
fun selectAuthorToolIdPage(page: IPage<Long>, @Param("searchValue") searchValue: String?): IPage<String>
|
||||
fun selectAuthorToolIdPage(
|
||||
page: IPage<Long>,
|
||||
@Param("searchValue") searchValue: String?,
|
||||
@Param("platform") platform: Platform? = null
|
||||
): IPage<String>
|
||||
|
||||
/**
|
||||
* Select author and tool ID by username in page
|
||||
|
||||
@@ -40,7 +40,7 @@ class StoreServiceImpl(
|
||||
toolIdsPage.setOptimizeCountSql(false)
|
||||
|
||||
val toolIdsIPage =
|
||||
baseMapper.selectAuthorToolIdPage(toolIdsPage, toolStoreGetParam.searchValue)
|
||||
baseMapper.selectAuthorToolIdPage(toolIdsPage, toolStoreGetParam.searchValue, toolStoreGetParam.platform)
|
||||
val toolPage = Page<Tool>(toolIdsIPage.current, toolIdsIPage.size, toolIdsIPage.total)
|
||||
if (toolIdsIPage.total > 0) {
|
||||
toolPage.setRecords(baseMapper.selectListByAuthorToolIds(toolIdsIPage.records, WebUtil.getLoginUserId(), toolStoreGetParam.platform))
|
||||
|
||||
Reference in New Issue
Block a user