| xqd
@@ -71,7 +71,7 @@ class PatientController extends AuthController
|
|
|
}
|
|
|
|
|
|
if (isset($req['comStatus']) && $req['comStatus'] == '0') {
|
|
|
- $comstatus = [1, 2, 3,7];
|
|
|
+ $comstatus = [ 2, 3,7];
|
|
|
$where[] = [function ($query) use ($comstatus) {
|
|
|
$query->whereIn('order_status', $comstatus);//处理中
|
|
|
}];
|
| xqd
@@ -93,7 +93,7 @@ class PatientController extends AuthController
|
|
|
$where['product_type'] = 1;//电话咨询
|
|
|
}
|
|
|
if (isset($req['processing']) && $req['processing'] == 0) {
|
|
|
- $status = [1, 2, 3];
|
|
|
+ $status = [2, 3];
|
|
|
$where[] = [function ($query) use ($status) {
|
|
|
$query->whereIn('order_status', $status);//处理中
|
|
|
}];
|
| xqd
@@ -262,6 +262,7 @@ class PatientController extends AuthController
|
|
|
$unlok = (new Commons())->unLokPhone($finds['xphone'], $finds['subs_id']);
|
|
|
Axb::where(['subs_id' => $finds['subs_id']])->delete();
|
|
|
}
|
|
|
+ $this->ReceivingReminderOK($find['id']);
|
|
|
|
|
|
return out();
|
|
|
|
| xqd
@@ -891,7 +892,6 @@ class PatientController extends AuthController
|
|
|
$Order['created_at'],
|
|
|
'',
|
|
|
]);
|
|
|
- var_dump($send);
|
|
|
}
|
|
|
}
|
|
|
}
|
| xqd
@@ -923,7 +923,7 @@ class PatientController extends AuthController
|
|
|
$type,
|
|
|
date('Y-m-d H:i',$Order['receiving_time']),
|
|
|
$Order['order_patient']['phone'],
|
|
|
- ]);
|
|
|
+ ],['wechat_official_message_template','wechat_small_program']);
|
|
|
}
|
|
|
}
|
|
|
}
|
| xqd
@@ -947,7 +947,7 @@ class PatientController extends AuthController
|
|
|
$list['organization']['name'],
|
|
|
$list['docter']['name'],
|
|
|
$user['nickname'],
|
|
|
- ]);
|
|
|
+ ],['wechat_official_message_template','wechat_small_program']);
|
|
|
}
|
|
|
}
|
|
|
}
|
| xqd
@@ -1058,5 +1058,33 @@ class PatientController extends AuthController
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 完成订单
|
|
|
+ * @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,
|
|
|
+ date('Y-m-d H:i',$Order['receiving_time']),
|
|
|
+ $Order['order_patient']['phone'],
|
|
|
+ ],['wechat_official_message_template','wechat_small_program']);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|