|
@@ -43,7 +43,7 @@ class overTimeOrder extends Command
|
|
public function handle()
|
|
public function handle()
|
|
{
|
|
{
|
|
$type = $this->argument('type');
|
|
$type = $this->argument('type');
|
|
- if(!in_array($type,['orderOut','appiontOut','thenOut','thenLose','orderCancel'])){
|
|
|
|
|
|
+ if(!in_array($type,['orderOut','appiontOut','thenOut','thenLose','orderCancel','orderComplete','todayReminder'])){
|
|
dd('请输入正确的参数');
|
|
dd('请输入正确的参数');
|
|
}
|
|
}
|
|
if($type == 'orderOut'){
|
|
if($type == 'orderOut'){
|
|
@@ -177,12 +177,13 @@ class overTimeOrder extends Command
|
|
if ($v['product_type']==1){
|
|
if ($v['product_type']==1){
|
|
if ((time()-$v['receiving_time'])>=$config_chat){
|
|
if ((time()-$v['receiving_time'])>=$config_chat){
|
|
$catNewIds[$k] = $v['id'];
|
|
$catNewIds[$k] = $v['id'];
|
|
- $patient->ReceivingReminderOK($v['id']);
|
|
|
|
|
|
+ $this->ReceivingReminderOK($v['id']);
|
|
}
|
|
}
|
|
}else if($v['product_type']==2){
|
|
}else if($v['product_type']==2){
|
|
if ((time()-$v['receiving_time'])>=$config_phone){
|
|
if ((time()-$v['receiving_time'])>=$config_phone){
|
|
$catNewIds[$k] = $v['id'];
|
|
$catNewIds[$k] = $v['id'];
|
|
- $patient->ReceivingReminderOK($v['id']);
|
|
|
|
|
|
+ $this->ReceivingReminderOK($v['id']);
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -296,4 +297,31 @@ class overTimeOrder extends Command
|
|
];
|
|
];
|
|
$res = send_wechatSubscription_message('cancel_reminder',$msgArr);
|
|
$res = send_wechatSubscription_message('cancel_reminder',$msgArr);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 完成订单
|
|
|
|
+ * @param $order_id
|
|
|
|
+ */
|
|
|
|
+ public function ReceivingReminderOK($order_id){
|
|
|
|
+ $Order = Order::with(['orderPatient','user'])->where(['id'=>$order_id])->first();
|
|
|
|
+ $type = '';
|
|
|
|
+ if ($Order['product_type']==1){
|
|
|
|
+ $type = '电话咨询已结束';
|
|
|
|
+ }elseif ($Order['product_type']==2){
|
|
|
|
+ $type = '图文咨询已结束 ';
|
|
|
|
+ }elseif ($Order['product_type']==3){
|
|
|
|
+ $type = '门诊预约';
|
|
|
|
+ }
|
|
|
|
+ if ($Order){
|
|
|
|
+ if ($Order['user']['openid']){
|
|
|
|
+ $send = send_wechatSubscription_message('receiving_reminderok',[
|
|
|
|
+ $Order['user']['openid'],
|
|
|
|
+ "pages/index",
|
|
|
|
+ $Order['order_sn'],
|
|
|
|
+ $type,
|
|
|
|
+ $Order['payment_amount'],
|
|
|
|
+ ],'wechat_small_program');
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|