diff --git a/src/main/kotlin/top/fatweb/oxygen/api/mapper/tool/StoreMapper.kt b/src/main/kotlin/top/fatweb/oxygen/api/mapper/tool/StoreMapper.kt index 8224526..4d3a11d 100644 --- a/src/main/kotlin/top/fatweb/oxygen/api/mapper/tool/StoreMapper.kt +++ b/src/main/kotlin/top/fatweb/oxygen/api/mapper/tool/StoreMapper.kt @@ -27,7 +27,11 @@ interface StoreMapper : BaseMapper { * @since 1.0.0 * @see IPage */ - fun selectAuthorToolIdPage(page: IPage, @Param("searchValue") searchValue: String?): IPage + fun selectAuthorToolIdPage( + page: IPage, + @Param("searchValue") searchValue: String?, + @Param("platform") platform: Platform? = null + ): IPage /** * Select author and tool ID by username in page diff --git a/src/main/kotlin/top/fatweb/oxygen/api/service/tool/impl/StoreServiceImpl.kt b/src/main/kotlin/top/fatweb/oxygen/api/service/tool/impl/StoreServiceImpl.kt index 809fe1d..5bd7743 100644 --- a/src/main/kotlin/top/fatweb/oxygen/api/service/tool/impl/StoreServiceImpl.kt +++ b/src/main/kotlin/top/fatweb/oxygen/api/service/tool/impl/StoreServiceImpl.kt @@ -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(toolIdsIPage.current, toolIdsIPage.size, toolIdsIPage.total) if (toolIdsIPage.total > 0) { toolPage.setRecords(baseMapper.selectListByAuthorToolIds(toolIdsIPage.records, WebUtil.getLoginUserId(), toolStoreGetParam.platform)) diff --git a/src/main/resources/mapper/tool/StoreMapper.xml b/src/main/resources/mapper/tool/StoreMapper.xml index dc71b72..9768151 100644 --- a/src/main/resources/mapper/tool/StoreMapper.xml +++ b/src/main/resources/mapper/tool/StoreMapper.xml @@ -20,6 +20,9 @@ or tk.keyword like concat('%', #{searchValue}, '%') ) + + and temp1.platform = #{platform} +