diff --git a/src/main/kotlin/top/fatweb/oxygen/api/service/tool/impl/ManagementServiceImpl.kt b/src/main/kotlin/top/fatweb/oxygen/api/service/tool/impl/ManagementServiceImpl.kt index e5180b1..19309bc 100644 --- a/src/main/kotlin/top/fatweb/oxygen/api/service/tool/impl/ManagementServiceImpl.kt +++ b/src/main/kotlin/top/fatweb/oxygen/api/service/tool/impl/ManagementServiceImpl.kt @@ -47,8 +47,7 @@ class ManagementServiceImpl( override fun getPage(toolManagementGetParam: ToolManagementGetParam?): PageVo { val toolIdsPage = Page(toolManagementGetParam?.currentPage ?: 1, toolManagementGetParam?.pageSize ?: 20) - - PageUtil.setPageSort(toolManagementGetParam, toolIdsPage, OrderItem.desc("id")) + toolIdsPage.setOptimizeCountSql(false) val toolIdsIPage = baseMapper.selectPage( 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 e1ba2f0..cc68ac2 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 @@ -25,6 +25,7 @@ import top.fatweb.oxygen.api.vo.tool.ToolVo class StoreServiceImpl : ServiceImpl(), IStoreService { override fun getPage(toolStoreGetParam: ToolStoreGetParam?): PageVo { val toolIdsPage = Page(toolStoreGetParam?.currentPage ?: 1, 20) + toolIdsPage.setOptimizeCountSql(false) val toolIdsIPage = baseMapper.selectPage(toolIdsPage, toolStoreGetParam?.searchValue) val toolPage = Page(toolIdsIPage.current, toolIdsIPage.size, toolIdsIPage.total) diff --git a/src/main/resources/mapper/tool/ManagementMapper.xml b/src/main/resources/mapper/tool/ManagementMapper.xml index a53ea79..1debeda 100644 --- a/src/main/resources/mapper/tool/ManagementMapper.xml +++ b/src/main/resources/mapper/tool/ManagementMapper.xml @@ -147,6 +147,7 @@ + order by t_b_tool_main.id desc