From f85236e897dff68a3749b8b2aed2a671e3b7b6dd Mon Sep 17 00:00:00 2001 From: qianhy Date: Wed, 14 Jun 2023 13:35:12 +0800 Subject: [PATCH] orders add_paylog notify --- admin/controllers/receiver/orderv2/Orders.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/admin/controllers/receiver/orderv2/Orders.php b/admin/controllers/receiver/orderv2/Orders.php index 3b1beccd..e6c2c32f 100644 --- a/admin/controllers/receiver/orderv2/Orders.php +++ b/admin/controllers/receiver/orderv2/Orders.php @@ -1378,8 +1378,12 @@ class Orders extends HD_Controller if (!$money || !$row || !$wx_mchid) { return $this->show_json(SYS_CODE_FAIL, '参数错误'); } + $notify = true; # 0614 防止修改唯一已支付记录时,重发订单通知 if($order_row["id"]){ //修改订单更新旧订单为无效订单 $this->app_liche_orders_model->update(['status'=>-1],['id'=>$order_row['id']]); + if ($order_row['pay_price'] >= 100 || $order_row['descrip']==1 && $order_row['descrip']=='零首付'){ + $notify = false; + } } $p_row = $this->app_liche_orders_model->get(['pid'=>0,'o_id'=>$row['id']]); $last_p_row = $this->app_liche_orders_model->get(['o_id'=>$row['id'],'type'=>3,'pid'=>$p_row['id'],'status>='=>0]); //尾款父订单 @@ -1433,7 +1437,7 @@ class Orders extends HD_Controller $img && $data['img'] = $img; $descrip && $data['descrip'] = $descrip; $this->app_liche_orders_model->add($data); - if($this->app_liche_orders_model->count(['status'=>1,'o_id'=>$row['id']])==1 && $money>=100){ //企业微信推送 + if($this->app_liche_orders_model->count(['status'=>1,'o_id'=>$row['id']])==1 && $money>=100 && $notify){ //企业微信推送 $this->orders_status_entity->set_status($row['id'],0,1); if(date('Y-m-d',strtotime($pay_time))==date('Y-m-d')){ //当天 $this->qyrobot->deposit_notify_v3($row['id']);