Fix(Store): Fix specify platform to search tools
This commit is contained in:
@@ -27,11 +27,7 @@ interface StoreMapper : BaseMapper<Tool> {
|
||||
* @since 1.0.0
|
||||
* @see IPage
|
||||
*/
|
||||
fun selectAuthorToolIdPage(
|
||||
page: IPage<Long>,
|
||||
@Param("searchValue") searchValue: String?,
|
||||
@Param("platform") platform: Platform
|
||||
): IPage<String>
|
||||
fun selectAuthorToolIdPage(page: IPage<Long>, @Param("searchValue") searchValue: String?): IPage<String>
|
||||
|
||||
/**
|
||||
* Select author and tool ID by username in page
|
||||
@@ -54,7 +50,11 @@ interface StoreMapper : BaseMapper<Tool> {
|
||||
* @since 1.0.0
|
||||
* @see Tool
|
||||
*/
|
||||
fun selectListByAuthorToolIds(@Param("ids") ids: List<String>, @Param("operator") operator: Long?): List<Tool>
|
||||
fun selectListByAuthorToolIds(
|
||||
@Param("ids") ids: List<String>,
|
||||
@Param("operator") operator: Long?,
|
||||
@Param("platform") platform: Platform? = null
|
||||
): List<Tool>
|
||||
|
||||
/**
|
||||
* Count published tool by username and toolId
|
||||
|
||||
@@ -40,10 +40,10 @@ class StoreServiceImpl(
|
||||
toolIdsPage.setOptimizeCountSql(false)
|
||||
|
||||
val toolIdsIPage =
|
||||
baseMapper.selectAuthorToolIdPage(toolIdsPage, toolStoreGetParam.searchValue, toolStoreGetParam.platform)
|
||||
baseMapper.selectAuthorToolIdPage(toolIdsPage, toolStoreGetParam.searchValue)
|
||||
val toolPage = Page<Tool>(toolIdsIPage.current, toolIdsIPage.size, toolIdsIPage.total)
|
||||
if (toolIdsIPage.total > 0) {
|
||||
toolPage.setRecords(baseMapper.selectListByAuthorToolIds(toolIdsIPage.records, WebUtil.getLoginUserId()))
|
||||
toolPage.setRecords(baseMapper.selectListByAuthorToolIds(toolIdsIPage.records, WebUtil.getLoginUserId(), toolStoreGetParam.platform))
|
||||
}
|
||||
|
||||
return ToolConverter.toolPageToToolPageVo(toolPage)
|
||||
|
||||
Reference in New Issue
Block a user