Quellcode durchsuchen

fix(api): 清理残留的fileUrl设置代码,更新验证逻辑说明

- 清理disabled-person.service.ts中残留的fileUrl设置代码
- 更新故事中的验证逻辑说明:不再自动添加fileUrl字段
- 使用parseWithAwait处理异步的fullUrl
- 所有测试通过

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
yourname vor 2 Tagen
Ursprung
Commit
b9fc7a1a4c

+ 0 - 11
allin-packages/disability-module/src/services/disabled-person.service.ts

@@ -162,17 +162,6 @@ export class DisabledPersonService extends GenericCrudService<DisabledPerson> {
         this.visitRepository.find({ where: { personId: In(personIds) } })
       ]);
 
-      // 为每个照片获取文件URL
-      for (const photo of photos) {
-        if (photo.file) {
-          try {
-            const url = await photo.file.fullUrl;
-            (photo as any).fileUrl = url;
-          } catch (error) {
-            console.error('获取文件URL失败:', error);
-          }
-        }
-      }
 
       // 将关联数据分组到对应的残疾人
       const bankCardsMap = new Map<number, DisabledBankCard[]>();