|
|
@@ -21,6 +21,7 @@ use app\common\enum\user\UserTerminalEnum;
|
|
|
use app\common\logic\PayNotifyLogic;
|
|
|
use app\common\model\recharge\RechargeOrder;
|
|
|
use app\common\model\user\UserAuth;
|
|
|
+use app\common\model\works\ServiceWork;
|
|
|
use app\common\service\wechat\WeChatConfigService;
|
|
|
use EasyWeChat\Pay\Application;
|
|
|
use EasyWeChat\Pay\Message;
|
|
|
@@ -385,7 +386,28 @@ class WeChatPayService extends BasePayService
|
|
|
PayNotifyLogic::handle('recharge', $message['out_trade_no'], $extra);
|
|
|
break;
|
|
|
case 'goods':
|
|
|
- PayNotifyLogic::handle('goods', $message['out_trade_no'], $extra);
|
|
|
+ $res = PayNotifyLogic::handle('goods', $message['out_trade_no'], $extra);
|
|
|
+ if($res === true){
|
|
|
+ // 用户下单后,给订单运营专员(配置固定ID)发送公众号提醒(订单信息)
|
|
|
+ $order = RechargeOrder::where('sn', $message['out_trade_no'])
|
|
|
+ ->where('payment_type','IN',[0,1])
|
|
|
+ ->where('pay_status','=',1)
|
|
|
+ ->findOrEmpty();
|
|
|
+ if(!$order->isEmpty()){
|
|
|
+ $workDetail = ServiceWork::findOrEmpty($order->work_id);
|
|
|
+ if(!$workDetail->isEmpty()){
|
|
|
+ event('Notice', [
|
|
|
+ 'scene_id' => 100,
|
|
|
+ 'params' => [
|
|
|
+ 'user_id' => 0,
|
|
|
+ 'thing3' => $workDetail['title'],
|
|
|
+ 'time6' => $workDetail['appointment_time'],
|
|
|
+ 'phone_number8' => $workDetail['mobile'],
|
|
|
+ ]
|
|
|
+ ]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
break;
|
|
|
}
|
|
|
}
|