Browse Source

视频问诊即时模式

lizhen_gitee 6 months ago
parent
commit
6824275d6a

+ 1 - 0
application/api/controller/tvuser/Tvdoctor.php

@@ -104,6 +104,7 @@ class Tvdoctor extends Api
                 'ordertype' => 2,
                 'status'    => ['IN','10,20,25,30'],//有效订单
                 'book_time'=> ['gt',time()],
+                'video_model' => 1, //预约模式
             ];
             $order_booked = Db::name('wenzhen_order')->where($map)->group('book_time')->column('book_time,count(id) as count_number');
             if(!empty($order_booked)){

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

@@ -488,6 +488,7 @@ class Authdoctor
             'doctor_id'=>$this->id,
             'ordertype'=>2,
             'status'=>10,
+            'video_model'=>1,
         ];
         $userinfo['wenzhen_video_noaccept_num'] = Db::name('wenzhen_order')->where($where)->count();
 

+ 2 - 2
application/index/controller/Plantask.php

@@ -26,7 +26,7 @@ class Plantask extends Controller
 
     }
 
-    //待接诊订单,医生不操作,支付N分钟后,自动退诊
+    //待接诊订单,医生不操作,支付N分钟后,自动退诊,即时视频订单除外
     public function auto_tuizhen_noaccept_order(){
         $nowtime  = time();
         $second   = config('site.payorder_noaccept_autotuizhen_minute') * 60;
@@ -35,7 +35,7 @@ class Plantask extends Controller
         //dump(datetime($lasttime));exit;
         Db::startTrans();
 
-        $wenzhen_order = Db::name('wenzhen_order')->where('status',10)->where('pay_time','lt',$lasttime)->order('id asc')->lock(true)->find();
+        $wenzhen_order = Db::name('wenzhen_order')->where('status',10)->where('video_mode','NEQ',2)->where('pay_time','lt',$lasttime)->order('id asc')->lock(true)->find();
         if(empty($order_list)){
             Db::rollback();
             echo 'empty';