Ver Fonte

🐛 fix(home): 修复时间银行活动查询逻辑

- 移除状态过滤条件,显示所有状态的时间银行活动
- 修改排序字段,从workDate改为startDate以获取准确的最新活动顺序
yourname há 8 meses atrás
pai
commit
109a74148a
1 ficheiros alterados com 1 adições e 2 exclusões
  1. 1 2
      src/server/modules/home/home.service.ts

+ 1 - 2
src/server/modules/home/home.service.ts

@@ -200,8 +200,7 @@ export class HomeService {
   async getTimeBankActivities(userId?: number, limit: number = 3): Promise<SilverTimeBank[]> {
     return await this.timeBankRepo
       .createQueryBuilder('timeBank')
-      .where('timeBank.status = :status', { status: 1 })
-      .orderBy('timeBank.workDate', 'DESC')
+      .orderBy('timeBank.startDate', 'DESC')
       .limit(limit)
       .getMany();
   }