From 150812e936a95ab694fc4c3507d333a35203677a Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Tue, 9 Jul 2024 10:14:59 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E6=9F=A5=E8=AF=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/logic/PayNotifyLogic.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index 8e204b1f6..91a87fc2a 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -627,6 +627,18 @@ class PayNotifyLogic extends BaseLogic $village_uid = User::where('id', 'in', $arr1)->where('user_ship', 2)->value('id') ?? 0; } } + }else{ + $address = UserAddress::where(['uid' => $order['spread_uid'], 'is_default' => 1])->find(); + 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') ?? 0; + } + $arr2 = UserAddress::where(['village' => $address['village'], 'brigade' => $address['brigade'], 'is_default' => 1])->column('uid'); + if ($arr2) { + $brigade_uid = User::where('id', 'in', $arr2)->where('user_ship', 3)->value('id') ?? 0; + } + } } } else { //查询用户对应的村长和队长