update:优化sql one more time

This commit is contained in:
zj
2021-07-23 15:55:10 +08:00
parent 06aa79e3f6
commit 84c8c949bb
@@ -136,8 +136,8 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
@Override
public IPage<SarStandProjectLibrary> queryProjectManager(int current, int pageSize) {
QueryWrapper<SarStandProjectLibrary> wrapper = new QueryWrapper<>();
wrapper.select("product_line as productLine","project_manager as projectManager","uName");
wrapper.last("inner join ts_user t on sar_stand_project_library.project_manager=t.usid group by sar_stand_project_library.product_line");
wrapper.select("distinct product_line","project_manager as projectManager","uName");
wrapper.last("inner join ts_user t on sar_stand_project_library.project_manager=t.usid");
Page<SarStandProjectLibrary> page = new Page<>(current, pageSize);
IPage<SarStandProjectLibrary> userIPage = sarStandProjectLibraryDao.selectPage(page, wrapper);
System.out.println("总条数"+userIPage.getTotal());