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

This commit is contained in:
疯狂的狮子Li
2023-09-15 18:22:17 +08:00
parent af2f1820f6
commit 9c22b6e0c2
12 changed files with 17 additions and 7 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;
}