From 7180e2ac2760f2122bc9a26eee2f77b9d627509c Mon Sep 17 00:00:00 2001 From: hailin Date: Fri, 30 Jan 2026 20:14:31 -0800 Subject: [PATCH] =?UTF-8?q?fix(contribution):=20=E7=AE=97=E5=8A=9B?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=8C=89=E5=B1=82=E7=BA=A7=E5=8D=87=E5=BA=8F?= =?UTF-8?q?=E6=8E=92=E5=88=97=20L1=E2=86=92L2=E2=86=92...=E2=86=92L15?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 用户期望 L1 在前 L15 在后,将 levelDepth/bonusTier 排序从 DESC 改为 ASC Co-Authored-By: Claude Opus 4.5 --- .../repositories/contribution-record.repository.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/services/contribution-service/src/infrastructure/persistence/repositories/contribution-record.repository.ts b/backend/services/contribution-service/src/infrastructure/persistence/repositories/contribution-record.repository.ts index 5df704ff..586f40d5 100644 --- a/backend/services/contribution-service/src/infrastructure/persistence/repositories/contribution-record.repository.ts +++ b/backend/services/contribution-service/src/infrastructure/persistence/repositories/contribution-record.repository.ts @@ -48,14 +48,14 @@ export class ContributionRecordRepository implements IContributionRecordReposito const page = options?.page ?? 1; const limit = options?.limit ?? 50; - // 根据 sourceType 动态排序:同伴下按 L 降序,同伴上按 T 降序,全部按 L/T 降序 + // 根据 sourceType 动态排序:同伴下按 L 升序,同伴上按 T 升序,全部按 L/T 升序 let orderBy: any; if (options?.sourceType === 'TEAM_LEVEL') { - orderBy = [{ levelDepth: 'desc' }, { createdAt: 'desc' }]; + orderBy = [{ levelDepth: 'asc' }, { createdAt: 'desc' }]; } else if (options?.sourceType === 'TEAM_BONUS') { - orderBy = [{ bonusTier: 'desc' }, { createdAt: 'desc' }]; + orderBy = [{ bonusTier: 'asc' }, { createdAt: 'desc' }]; } else { - orderBy = [{ levelDepth: 'desc' }, { bonusTier: 'desc' }, { createdAt: 'desc' }]; + orderBy = [{ levelDepth: 'asc' }, { bonusTier: 'asc' }, { createdAt: 'desc' }]; } const [records, total] = await Promise.all([