liugc 1 год назад
Родитель
Сommit
f90b32a644
1 измененных файлов с 12 добавлено и 1 удалено
  1. 12 1
      app/workerapi/logic/MasterWorkerLogic.php

+ 12 - 1
app/workerapi/logic/MasterWorkerLogic.php

@@ -9,11 +9,13 @@ use app\common\model\master_worker\MasterWorker;
 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\works\ServiceWork;
 use app\common\service\FileService;
 use app\workerapi\service\MasterWokerTaskRequiredService;
 use think\Exception;
 use think\facade\Config;
+use think\facade\Log;
 
 /**
  * @author 林海涛
@@ -68,6 +70,12 @@ class MasterWorkerLogic extends  BaseLogic
             }
             $user->mobile= $params['mobile'];
             $user->save();
+
+            //更新注册表手机号
+            MasterWorkerRegister::where('worker_id',$userId)->update(['mobile'=>$params['mobile']]);
+            //更新师傅信息表手机号
+            MasterWorkerInfo::where('worker_id',$userId)->update(['mobile'=>$params['mobile']]);
+
             return true;
         } catch (\Exception $e) {
             self::setError($e->getMessage());
@@ -234,11 +242,14 @@ class MasterWorkerLogic extends  BaseLogic
         $configs = TrainingBlockConfigLogic::getRequiredConfig($identity_source);
         foreach ($configs as $item) {
             if($item['is_must']){
+                Log::info('taskRequired-1'.json_encode($item));
                 $service = (new MasterWokerTaskRequiredService());
                 if(!method_exists($service,$item['execute_function'])){
                     continue;
                 }
-                if($service->$item['execute_function']($userId) === false){
+                $res = $service->$item['execute_function']($userId);
+                Log::info('taskRequired-2:'.$userId.'-'.$item['execute_function'].'-'.$res);
+                if($res === false){
                     return false;
                 }
             }