更新兼容性
This commit is contained in:
parent
4e48919944
commit
35de09d273
@ -99,11 +99,13 @@ class RechargeLogic extends BaseLogic
|
||||
]);
|
||||
|
||||
// 更新用户余额及累计充值金额
|
||||
User::where(['id' => $order['user_id']])
|
||||
->dec('total_recharge_amount', $order['order_amount'])
|
||||
->dec('user_money', $order['order_amount'])
|
||||
->update();
|
||||
|
||||
$userInfo = User::where(['id' => $order['user_id']])->findOrEmpty();
|
||||
if ($userInfo['total_recharge_amount'] >= $order['order_amount']) {
|
||||
User::where(['id' => $order['user_id']])
|
||||
->dec('total_recharge_amount', $order['order_amount'])
|
||||
->dec('user_money', $order['order_amount'])
|
||||
->update();
|
||||
}
|
||||
// 记录日志
|
||||
AccountLogLogic::add(
|
||||
$order['user_id'],
|
||||
|
Loading…
x
Reference in New Issue
Block a user