From a17753cf34a5f44488e790c58c52c86909e19356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Mon, 1 Aug 2022 14:01:22 +0800 Subject: [PATCH] Update UserUpgradeService.php --- app/data/service/UserUpgradeService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/data/service/UserUpgradeService.php b/app/data/service/UserUpgradeService.php index bcec00b3e..0bed86186 100644 --- a/app/data/service/UserUpgradeService.php +++ b/app/data/service/UserUpgradeService.php @@ -86,7 +86,7 @@ class UserUpgradeService extends Service $teamsIndirect = DataUser::mk()->where(['pid2' => $uuid])->whereIn('vip_code', $vipTeam)->count(); $teamsUsers = $teamsDirect + $teamsIndirect; // 动态计算用户等级 - foreach ($levels as $item) { + foreach (array_reverse($levels) as $item) { $l1 = empty($item['goods_vip_status']) || $user['buy_vip_entry'] > 0; $l2 = empty($item['teams_users_status']) || $item['teams_users_number'] <= $teamsUsers; $l3 = empty($item['order_amount_status']) || $item['order_amount_number'] <= $orderAmount;