调整请领单查询接口:按照create_time/update_time取最大后排序(把最新变更状态的单子放前面)

This commit is contained in:
1378012178@qq.com 2025-12-02 15:04:59 +08:00
parent 7ddc0ef0df
commit 4852e43705
1 changed files with 4 additions and 5 deletions

View File

@ -47,11 +47,10 @@
</if> </if>
</where> </where>
ORDER BY ORDER BY
CASE GREATEST(
WHEN main.update_time IS NULL THEN 0 COALESCE(main.update_time, '1970-01-01 00:00:00'),
ELSE 1 COALESCE(main.create_time, '1970-01-01 00:00:00')
END ASC, ) DESC,
COALESCE(main.update_time, '1970-01-01 00:00:00') DESC,
main.create_time DESC main.create_time DESC
</select> </select>