update 优化 全业务分页查询增加排序规则避免因where条件导致乱序问题

This commit is contained in:
疯狂的狮子Li
2023-09-15 18:06:34 +08:00
parent 3a67a6599f
commit 7e62401bac
12 changed files with 67 additions and 58 deletions

View File

@ -65,6 +65,7 @@ public class TestDemoServiceImpl implements ITestDemoService {
lqw.eq(StringUtils.isNotBlank(bo.getValue()), TestDemo::getValue, bo.getValue());
lqw.between(params.get("beginCreateTime") != null && params.get("endCreateTime") != null,
TestDemo::getCreateTime, params.get("beginCreateTime"), params.get("endCreateTime"));
lqw.orderByAsc(TestDemo::getId);
return lqw;
}

View File

@ -47,6 +47,7 @@ public class TestTreeServiceImpl implements ITestTreeService {
lqw.like(StringUtils.isNotBlank(bo.getTreeName()), TestTree::getTreeName, bo.getTreeName());
lqw.between(params.get("beginCreateTime") != null && params.get("endCreateTime") != null,
TestTree::getCreateTime, params.get("beginCreateTime"), params.get("endCreateTime"));
lqw.orderByAsc(TestTree::getId);
return lqw;
}