lrf 1 month ago
parent
commit
aef9230c65
1 changed files with 4 additions and 6 deletions
  1. 4 6
      src/controller/match/matchExt.controller.ts

+ 4 - 6
src/controller/match/matchExt.controller.ts

@@ -103,17 +103,13 @@ export class MatchExtController implements BaseController {
      *    ext.status => "1" 变为 报名阶段-已结束
      *  赛事表:
      *    match.status =>"2" 变为 进行中
-     *  赛事报名表:
-     *    处于 报名阶段(ext_status='0') 且 已通过审核的报名信息(status='1') 变为 初审阶段(ext_status='1')且未通过审核(status='0')的报名信息
-     *    reg.ext_status: "0" => "1"
-     *    reg.status: "1" => "0"
      */
     const match_id = get(data, 'match_id');
     await this.service.checkMatchStatus(match_id, '1');
     await this.service.checkMatchExtStatus(match_id, '0');
     await this.matchService.update({ id: match_id }, { match_status: '2' });
     await this.service.update({ match_id }, { status: '1' });
-    await this.matchRegService.update({ match_id, ext_status: '0', status: '1' }, { ext_status: '1', status: '0' });
+    await this.matchRegService.update({ match_id, ext_status: '0', status: '1' }, { ext_status: '1' });
     return 'ok';
   }
 
@@ -135,12 +131,14 @@ export class MatchExtController implements BaseController {
      *  赛事拓展表:
      *    ext.status => "2" 变为 初审阶段-组织初审
      *  赛事报名表:
+     *    处于 报名阶段(ext_status='0') 且 已通过审核的报名信息(status='1') 变为 初审阶段(ext_status='1')且未通过审核(status='0')的报名信息
      *    reg.ext_status: "1" => '2'
+     *    reg.status: "1" => "0"
      */
     const match_id = get(data, 'match_id');
     await this.service.checkMatchExtStatus(match_id, '1');
     await this.service.update({ match_id }, { status: '2' });
-    await this.matchRegService.update({ match_id, ext_status: '1' }, { ext_status: '2' });
+    await this.matchRegService.update({ match_id, ext_status: '1', status: '1' }, { ext_status: '2', status: '0' });
   }
 
   /**