orders add_paylog notify

This commit is contained in:
qianhy
2023-06-14 13:35:12 +08:00
committed by lccsw
parent 536cdb048f
commit f85236e897
@@ -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']);