| xqd
@@ -119,7 +119,8 @@ class overTimeOrder extends Command
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 订单超时自动完成(定时)
|
|
|
+ * 有医生接单的情况
|
|
|
+ * 订单超时自动完成 电话 图文 门诊(定时)
|
|
|
*/
|
|
|
public function overTimeOrers(){
|
|
|
$config_chat = SystemConfig::get('docter_config','chat_complete_time');
|
| xqd
@@ -160,7 +161,8 @@ class overTimeOrder extends Command
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 订单接单超时自动取消(定时)
|
|
|
+ * 没有医生接单的情况
|
|
|
+ * 订单接单超时自动取消 电话 图文(定时)
|
|
|
*/
|
|
|
public function orderCancel(){
|
|
|
|
| xqd
@@ -174,7 +176,7 @@ class overTimeOrder extends Command
|
|
|
$inOrder = Order::with('orderPatient')->with('orderUser')->with('docter')->where('product_type','<',3)->where(['order_status'=>2,'payment_status'=>2])->get();
|
|
|
foreach ($inOrder as $k=>$v){
|
|
|
if ($v['product_type']==1){
|
|
|
- if ((time()-strtotime($v['create_at']))>=$config_phone){
|
|
|
+ if ((time()-intval($v['payment_time']))>=$config_phone){
|
|
|
$catNewIds[$k] = $v['id'];
|
|
|
$res = Order::orderCancel($v['id'],'医生超时未接单自动取消');
|
|
|
//取消成功才发送消息
|
| xqd
@@ -184,7 +186,7 @@ class overTimeOrder extends Command
|
|
|
}
|
|
|
}
|
|
|
}else if($v['product_type']==2){
|
|
|
- if ((time()-strtotime($v['create_at']))>=$config_chat){
|
|
|
+ if ((time()-intval($v['payment_time']))>=$config_chat){
|
|
|
$res = Order::orderCancel($v['id'],'医生超时未接单自动取消');
|
|
|
//取消成功才发送消息
|
|
|
if($res){
|