From 0dd6f94171e1c49a092bb168bc698feecaae20b6 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Fri, 5 Jul 2024 11:31:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=A0=B9=E6=8D=AE=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E4=BB=B7=E6=A0=BC=E8=B0=83=E6=95=B4=E4=BC=9A=E5=91=98=E7=A7=AF?= =?UTF-8?q?=E5=88=86=E8=AE=A1=E7=AE=97=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/logic/UserSignLogic.php | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/app/common/logic/UserSignLogic.php b/app/common/logic/UserSignLogic.php index fc7e63791..a0a792d95 100644 --- a/app/common/logic/UserSignLogic.php +++ b/app/common/logic/UserSignLogic.php @@ -20,7 +20,26 @@ class UserSignLogic extends BaseLogic */ public static function dealRechargeFrozen($user, $order, $user_ship = 0) { - $total_vip = bcmul($order['price'], 0.1, 2); + switch ($order['price']) { + case ($order['price'] >= 1000 && $order['price'] < 2000): + $total_vip = bcmul($order['price'], 0.25, 2); + break; + case ($order['price'] >= 2000 && $order['price'] < 5000): + $total_vip = bcmul($order['price'], 0.28, 2); + break; + case ($order['price'] >= 5000 && $order['price'] < 10000): + $total_vip = bcmul($order['price'], 0.31, 2); + break; + case ($order['price'] >= 10000): + $total_vip = bcmul($order['price'], 0.35, 2); + break; + default: + $total_vip = 0; + break; + } + if($total_vip==0){ + return false; + } $count = UserSign::where('uid', $order->uid)->count(); if ($count == 0 && in_array($user_ship, [1, 2, 3, 5, 6, 7, 8])) { //首充