Pārlūkot izejas kodu

无任务直接通过

liugc 1 gadu atpakaļ
vecāks
revīzija
4ab2e900e5
1 mainītis faili ar 6 papildinājumiem un 0 dzēšanām
  1. 6 0
      app/workerapi/logic/MasterWorkerLogic.php

+ 6 - 0
app/workerapi/logic/MasterWorkerLogic.php

@@ -10,6 +10,7 @@ use app\common\model\master_worker\MasterWorkerAccountLog;
 use app\common\model\master_worker\MasterWorkerAgree;
 use app\common\model\master_worker\MasterWorkerInfo;
 use app\common\model\master_worker_register\MasterWorkerRegister;
+use app\common\model\training\TrainingWorkerTask;
 use app\common\model\works\ServiceWork;
 use app\common\service\FileService;
 use app\workerapi\service\MasterWokerTaskRequiredService;
@@ -243,6 +244,11 @@ class MasterWorkerLogic extends  BaseLogic
         {"block_key":2,"type":"training_task_id","type_value":1,"res_name":"operate_status","execute_function":"operateStatus","is_must":true},
         {"block_key":3,"type":"task_list","type_value":["1","2","4"],"res_name":"operate_status","execute_function":"operateStatus","is_must":false}]*/
 
+
+        $trainingWorkerTask = TrainingWorkerTask::where(['master_worker_id'=>$userId])->findOrEmpty();
+        if($trainingWorkerTask->isEmpty()){
+            return true;
+        }
         $configs = TrainingBlockConfigLogic::getRequiredConfig($identity_source);
         foreach ($configs as $item) {
             if($item['is_must']){