From 44c1bb40fd294e4e1a7fc18eb0228c047eb20aba Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Fri, 28 Jun 2024 14:43:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=85=E5=80=BC=E9=80=80?= =?UTF-8?q?=E6=AC=BE=E9=80=80=E7=A4=BC=E5=93=81=E5=88=B8=E7=9A=84=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/logic/PayNotifyLogic.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index 83af6e9f7..2b314a3d3 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -431,7 +431,7 @@ class PayNotifyLogic extends BaseLogic $orderRe->refund_time = time(); $orderRe->remarks = ''; $orderRe->save(); - + self::descUserSing($orderRe); return true; } $order->status = OrderEnum::REFUND_PAY; @@ -480,8 +480,9 @@ class PayNotifyLogic extends BaseLogic return true; // self::afterPay($order,$extra['transaction_id']); } + - //退积分 + //退积分-->订单 public static function descUserSing($order) { $user_sing = new UserSign(); @@ -501,12 +502,12 @@ class PayNotifyLogic extends BaseLogic 'order_id'=>$order['order_id'], 'financial_pm'=>1, ])->update(['delete_time'=>time()]); - $now_int = User::where('id',$order['uid'])->find(); + $now_int = User::where('id',$order['uid'])->withTrashed()->find(); if($now_int){ if($now_int['integral'] > $user_number){ - User::where('id',$order['uid'])->dec('integral',$user_number)->update(); + User::where('id',$order['uid'])->withTrashed()->dec('integral',$user_number)->update(); }else{ - User::where('id',$order['uid'])->dec('integral',$now_int['integral'])->update(); + User::where('id',$order['uid'])->withTrashed()->dec('integral',$now_int['integral'])->update(); } }