소스 검색

门诊超时调试

whj 4 년 전
부모
커밋
f48943ec08
1개의 변경된 파일6개의 추가작업 그리고 4개의 파일을 삭제
  1. 6 4
      app/Console/Commands/overTimeOrder.php

+ 6 - 4
app/Console/Commands/overTimeOrder.php

xqd xqd xqd
@@ -48,7 +48,7 @@ class overTimeOrder extends Command
         if($type == 'orderOut'){
             //订单超时
             $this->overTimeOrers();
-            dd('订单超时'.date('Y-m-d H:i:s'));
+            dd('订单超时检查执行时间'.date('Y-m-d H:i:s'));
         } else if($type == 'appiontOut'){
             //预约超时
             $this->AppointReminder();
@@ -130,12 +130,14 @@ class overTimeOrder extends Command
         $catNewIds = [];
         $menNewIds = [];
         foreach ($inOrder as $k=>$v){
+
             if ($v['product_type']==1){
-                if ((time()-$v['receiving_time'])>=$config_chat){
+                if ((time()-intval($v['receiving_time']))>=$config_phone){
                     $catNewIds[$k] = $v['id'];
                 }
             }else if($v['product_type']==2){
-                if ((time()-$v['receiving_time'])>=$config_phone){
+                if ((time()-$v['receiving_time'])>=$config_chat){
+                    echo $v->order_sn.PHP_EOL;
                     $catNewIds[$k] = $v['id'];
                 }
             }else if($v['product_type']==3){
@@ -145,7 +147,7 @@ class overTimeOrder extends Command
             }
 
         }
-        echo '图文订单'.count($catNewIds).'个  ---'.'门诊订单'.count($menNewIds).'个';
+//        echo '图文订单'.count($catNewIds).'个  ---'.'门诊订单'.count($menNewIds).'个';
         if ($catNewIds || $menNewIds){
             // 操作图文和电话订单为已完成
             Order::whereIn('id',$catNewIds)->update(['order_status'=>4]);