Explorar o código

修改工程师账号显示

dongxiaoqin hai 8 meses
pai
achega
81f5c516eb

+ 2 - 2
app/adminapi/logic/works/ServiceWorkLogic.php

@@ -558,7 +558,7 @@ class ServiceWorkLogic extends BaseLogic
             $work->dispatch_time = time();
 
             //长期合作工程师,派单即领单
-            if ($worker->type == 2){
+            if ($worker->type >= 2){
                 $work->work_status = 2;
                 $work->receive_time = time();
             }
@@ -1135,7 +1135,7 @@ class ServiceWorkLogic extends BaseLogic
             if($worker->isEmpty()){
                 throw new \Exception('工程师不存在');
             }
-            if ($type == 2 && $worker->type == 2) {          
+            if ($type >= 2 && $worker->type >= 2) {          
                 throw new \Exception('您当前无权限取消分配');  
             }
 

+ 0 - 3
app/workerapi/logic/AccountLogic.php

@@ -28,9 +28,6 @@ class AccountLogic extends BaseLogic
             $yetime = strtotime("$yDay 23:59:59");//昨天开始时间戳
             $data= ['user_money' =>0,'account_yesterday' => 0,'case_out_money' => 0];
             $masterWorker = MasterWorker::where('id',$params['worker_id'])->field('user_money,type')->findOrEmpty();
-            if ($masterWorker->type == 2) {
-                return ['user_money' =>"-",'account_yesterday' => "-",'case_out_money' => "-"];
-            }
             $data['user_money'] = $masterWorker && $masterWorker->user_money ? $masterWorker->user_money : 0;
             $where = [];
             $where[] = ['worker_id','=',$params['worker_id']] ;