From 84d056bfaf2e3254614be193d0226e5512c1888b Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Tue, 18 Jun 2024 11:45:09 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E9=80=BB=E8=BE=91=E4=BB=A5=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E7=A7=AF=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/logic/PayNotifyLogic.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index 0db3235b4..a6da7a402 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -378,16 +378,18 @@ class PayNotifyLogic extends BaseLogic if ($address) { $arr1 = UserAddress::where(['village' => $address['village'], 'is_default' => 1])->column('uid'); if ($arr1) { - $village_uid = User::where('id', 'in', $arr1)->where('user_ship', 2)->value('id'); - if ($village_uid) { - User::where('id', $village_uid)->inc('integral', $fees)->update(); + $uid = User::where('id', 'in', $arr1)->where('user_ship', 2)->value('id'); + if ($uid) { + User::where('id', $uid)->inc('integral', $fees)->update(); + $village_uid=$uid; } } $arr2 = UserAddress::where(['village' => $address['village'], 'brigade' => $address['brigade'], 'is_default' => 1])->column('uid'); if ($arr2) { - $brigade_uid = User::where('id', 'in', $arr1)->where('user_ship', 3)->value('id'); - if ($brigade_uid) { - User::where('id', $brigade_uid)->inc('integral', $fees)->update(); + $uid = User::where('id', 'in', $arr1)->where('user_ship', 3)->value('id'); + if ($uid) { + User::where('id', $uid)->inc('integral', $fees)->update(); + $brigade_uid=$uid; } } }