Browse Source

医生,待接订单数量

lizhen_gitee 9 months ago
parent
commit
fa9b05adf8

+ 0 - 6
application/api/controller/doctor/User.php

@@ -224,12 +224,6 @@ class User extends Apic
     }
 
 
-    //用户详细资料
-    public function getUserinfo(){
-        $info = $this->auth->getUserinfo();
-
-        $this->success(__('success'),$info);
-    }
 
     /**
      * 重置密码

+ 20 - 0
application/common/library/Authdoctor.php

@@ -475,6 +475,26 @@ class Authdoctor
             $userinfo['finish_profile'] = 1;
         }
 
+        //待接图文订单
+        $where = [
+            'doctor_id'=>$this->id,
+            'ordertype'=>1,
+            'status'=>10,
+        ];
+        $userinfo['wenzhen_text_noaccept_num'] = Db::name('wenzhen_order')->where($where)->count();
+
+        //待接视频订单
+        $where = [
+            'doctor_id'=>$this->id,
+            'ordertype'=>2,
+            'status'=>10,
+        ];
+        $userinfo['wenzhen_video_noaccept_num'] = Db::name('wenzhen_order')->where($where)->count();
+
+        //待接订单
+        $userinfo['wenzhen_noaccept_num'] = $userinfo['wenzhen_text_noaccept_num'] + $userinfo['wenzhen_video_noaccept_num'];
+
+
         return $userinfo;
     }