From 195e2fa3f760c14db8dda24d60e4dad78d830fce Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Thu, 27 Jun 2024 20:47:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E8=88=B9=E5=8F=AA=E7=AD=89=E7=BA=A7=E5=8F=98=E6=9B=B4=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/api/controller/store/StoreController.php | 1 + app/common/logic/PayNotifyLogic.php | 10 ++-------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/app/api/controller/store/StoreController.php b/app/api/controller/store/StoreController.php index 666bc0fe2..369c9709a 100644 --- a/app/api/controller/store/StoreController.php +++ b/app/api/controller/store/StoreController.php @@ -103,6 +103,7 @@ class StoreController extends BaseApiController 'order_id'=>getNewOrderId('CZ'), 'price'=>$params['price']??1000, 'recharge_type'=>'INDUSTRYMEMBERS', + 'user_ship'=>$params['user_ship']??0, ]; $order = UserRecharge::create($data); diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index e746a956b..2105d0434 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -652,14 +652,8 @@ class PayNotifyLogic extends BaseLogic bcscale(2); // $user->now_money = bcadd($user->now_money, $price, 2);//v.1 //更新等级 - $limit_1=UserShip::where('id',1)->value('limit'); - $limit_4=UserShip::where('id',4)->value('limit'); - if ($price >= $limit_1 &&$price<$limit_4) { - $user->user_ship = 1; //v.1 - } - if ($price>$limit_4) { - $user->user_ship = 4; - } + $user->user_ship = $order['user_ship']; + $user->purchase_funds = bcadd($user->purchase_funds, $price, 2); $user->total_recharge_amount = bcadd($user->total_recharge_amount, $price, 2); $user->save();