fix(api): 客户/群排序改回last_chat_time DESC(云客按最近沟通优先)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
浅念
2026-08-15 14:18:42 +08:00
parent 854da6e566
commit 2d1943a74e
3 changed files with 5 additions and 6 deletions
+1
View File
@@ -71,6 +71,7 @@ async def list_customers(
list_stmt = list_stmt.where(*conditions)
list_stmt = (
list_stmt.order_by(
sa.nullslast(Customer.last_chat_time.desc()),
Customer.friend_id.asc(),
)
.limit(page_size)
+1
View File
@@ -61,6 +61,7 @@ async def list_groups(
list_stmt = list_stmt.where(*conditions)
list_stmt = (
list_stmt.order_by(
sa.nullslast(ChatGroup.last_chat_time.desc()),
ChatGroup.room_id.asc(),
)
.limit(page_size)