From 855c600f2bcf88ac7aae138dac497d447ce963f3 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Thu, 27 Jun 2024 15:33:35 +0800 Subject: [PATCH] =?UTF-8?q?feat(PayNotifyLogic):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=96=B0=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=8E=A8=E9=80=81=E6=96=B0?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E4=BF=A1=E6=81=AF=E8=87=B3=E6=8C=87=E5=AE=9A?= =?UTF-8?q?URL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/logic/PayNotifyLogic.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index 4964f4f8a..5d808912e 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -25,6 +25,7 @@ use app\common\model\user\UserAddress; use app\common\model\user\UserRecharge; use app\common\model\user\UserShip; use app\common\model\user_sign\UserSign; +use app\common\service\Curl; use app\common\service\PushService; use support\Log; use think\facade\Db; @@ -585,6 +586,19 @@ class PayNotifyLogic extends BaseLogic $financeLogic = new StoreFinanceFlowLogic(); $user_sing = new UserSign(); $off_activity = Config::where('name', 'off_activity')->value('value'); + try{ + $url=getenv('WETCHA_PUSH'); + if($url){ + $order_id=$order['order_id']; + $pay_price=$order['pay_price']; + $arr=["msgtype"=>"markdown","markdown"=>["content"=> "有新的订单请及时跟踪\n + >单号:$order_id + >金额:$pay_price"]]; + (new Curl())->post($url,$arr); + } + }catch(\Exception $e){ + Log::error('推送订单失败',['order_id'=>$order['id'],'error'=>$e->getMessage()]); + } if ($off_activity == 1) { //-----活动价结算更改 $financeLogic->order = $order;