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
|
* @since 1.0.0
|
||||||
* @see IPage
|
* @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
|
* Select author and tool ID by username in page
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class StoreServiceImpl(
|
|||||||
toolIdsPage.setOptimizeCountSql(false)
|
toolIdsPage.setOptimizeCountSql(false)
|
||||||
|
|
||||||
val toolIdsIPage =
|
val toolIdsIPage =
|
||||||
baseMapper.selectAuthorToolIdPage(toolIdsPage, toolStoreGetParam.searchValue)
|
baseMapper.selectAuthorToolIdPage(toolIdsPage, toolStoreGetParam.searchValue, toolStoreGetParam.platform)
|
||||||
val toolPage = Page<Tool>(toolIdsIPage.current, toolIdsIPage.size, toolIdsIPage.total)
|
val toolPage = Page<Tool>(toolIdsIPage.current, toolIdsIPage.size, toolIdsIPage.total)
|
||||||
if (toolIdsIPage.total > 0) {
|
if (toolIdsIPage.total > 0) {
|
||||||
toolPage.setRecords(baseMapper.selectListByAuthorToolIds(toolIdsIPage.records, WebUtil.getLoginUserId(), toolStoreGetParam.platform))
|
toolPage.setRecords(baseMapper.selectListByAuthorToolIds(toolIdsIPage.records, WebUtil.getLoginUserId(), toolStoreGetParam.platform))
|
||||||
|
|||||||
@@ -20,6 +20,9 @@
|
|||||||
or tk.keyword like concat('%', #{searchValue}, '%')
|
or tk.keyword like concat('%', #{searchValue}, '%')
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
<if test="platform != null">
|
||||||
|
and temp1.platform = #{platform}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
<choose>
|
<choose>
|
||||||
<when test="searchValue != null">
|
<when test="searchValue != null">
|
||||||
|
|||||||
Reference in New Issue
Block a user