lrf %!s(int64=3) %!d(string=hai) anos
pai
achega
4e14f28a2a
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      app/service/mission.js

+ 2 - 2
app/service/mission.js

@@ -68,10 +68,10 @@ class MissionService extends CrudService {
       );
     } catch (error) {
       console.error(error.toString());
-      await this.updateOne({ id }, { status: '3' });
+      await this.model.updateOne({ id }, { status: '3' });
       throw new BusinessError(ErrorCode.SERVICE_FAULT, '执行任务失败');
     }
-    await this.updateOne({ id }, { status: '1', progress: undefined });
+    await this.model.updateOne({ id }, { status: '1', progress: undefined });
   }
 
   async updateProgress({ id, progress, status = '1', remark }) {