feat: 增加用户船只等级变更逻辑
This commit is contained in:
parent
8cd6b63432
commit
195e2fa3f7
@ -103,6 +103,7 @@ class StoreController extends BaseApiController
|
|||||||
'order_id'=>getNewOrderId('CZ'),
|
'order_id'=>getNewOrderId('CZ'),
|
||||||
'price'=>$params['price']??1000,
|
'price'=>$params['price']??1000,
|
||||||
'recharge_type'=>'INDUSTRYMEMBERS',
|
'recharge_type'=>'INDUSTRYMEMBERS',
|
||||||
|
'user_ship'=>$params['user_ship']??0,
|
||||||
];
|
];
|
||||||
$order = UserRecharge::create($data);
|
$order = UserRecharge::create($data);
|
||||||
|
|
||||||
|
@ -652,14 +652,8 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
bcscale(2);
|
bcscale(2);
|
||||||
// $user->now_money = bcadd($user->now_money, $price, 2);//v.1
|
// $user->now_money = bcadd($user->now_money, $price, 2);//v.1
|
||||||
//更新等级
|
//更新等级
|
||||||
$limit_1=UserShip::where('id',1)->value('limit');
|
$user->user_ship = $order['user_ship'];
|
||||||
$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->purchase_funds = bcadd($user->purchase_funds, $price, 2);
|
$user->purchase_funds = bcadd($user->purchase_funds, $price, 2);
|
||||||
$user->total_recharge_amount = bcadd($user->total_recharge_amount, $price, 2);
|
$user->total_recharge_amount = bcadd($user->total_recharge_amount, $price, 2);
|
||||||
$user->save();
|
$user->save();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user