This commit is contained in:
mkm 2024-06-28 11:44:52 +08:00
commit 643e1894e7
2 changed files with 5 additions and 5 deletions

View File

@ -39,8 +39,8 @@ class CapitalFlowLogic extends BaseLogic
$model->link_id = $linkId;
$model->amount = $amount;
if($type){
$model->before_balance = $this->user['now_money'];
$model->balance = $this->user['now_money'];
$model->before_balance = $this->user['purchase_funds'];
$model->balance = bcsub($this->user['purchase_funds'], $amount, 2);
}else{
$model->before_balance = $this->user['now_money'];
$model->balance = bcadd($this->user['now_money'], $amount, 2);
@ -73,8 +73,8 @@ class CapitalFlowLogic extends BaseLogic
$model->link_id = $linkId;
$model->amount = $amount;
if($payType == OrderEnum::BALANCE_PAYMEN_NO){
$model->before_balance = $this->user['now_money'];
$model->balance = $this->user['now_money'];
$model->before_balance = $this->user['purchase_funds'];
$model->balance = bcsub($this->user['purchase_funds'], $amount, 2);
}else{
$model->before_balance = $this->user['now_money'];
$model->balance = bcsub($this->user['now_money'], $amount, 2);

View File

@ -650,7 +650,7 @@ class PayNotifyLogic extends BaseLogic
$user = User::where('id', $uid)->findOrEmpty();
//用户的财务add
$capitalFlowDao = new CapitalFlowLogic($user);
$capitalFlowDao->userIncome('user_balance_recharge', 'user_recharge', $order['id'], $price);
$capitalFlowDao->userIncome('user_balance_recharge', 'user_recharge', $order['id'], $price,[],1);
if ($user->isEmpty()) {
return true;