refactor(order): 调整订单列表排序规则

- 移除状态排序逻辑
- 修改排序规则为合同号倒序排列
- 更新注释说明新的排序方式
- 保持置顶优先的排序策略不变
This commit is contained in:
2026-06-06 12:58:12 +08:00
parent 0e85153b3d
commit 724c1dd16f

View File

@@ -250,11 +250,9 @@ public class CrmOrderServiceImpl implements ICrmOrderService {
qw.eq("co.del_flag", 0);
//排序规则:
// 1. 置顶优先 (is_top=1 排在前面)
// 2. 状态为1(已生效)的排在前
// 3. 创建时间倒序
// 2. 合同号倒序KLPY+年月日+序号,降序最新在前
qw.orderByDesc("co.is_top")
.orderByDesc("CASE WHEN co.status = 1 THEN 1 ELSE 0 END")
.orderByDesc("co.create_time");
.orderByDesc("co.contract_code");
return qw;
}