feat: 修改CapitalFlowLogic和PayNotifyLogic类中的userIncome和userExpense方法,增加新的支付类型和退款描述,优化代码格式。
This commit is contained in:
parent
b8aad3cdc2
commit
de313f1bed
@ -171,9 +171,10 @@ class CapitalFlowLogic extends BaseLogic
|
|||||||
return "系统增加采购款{$amount}元";
|
return "系统增加采购款{$amount}元";
|
||||||
case 'system_balance_reduce':
|
case 'system_balance_reduce':
|
||||||
return "系统减少余额{$amount}元";
|
return "系统减少余额{$amount}元";
|
||||||
|
case 'user_balance_recharge_refund':
|
||||||
|
return "用户充值退还{$amount}元";
|
||||||
default:
|
default:
|
||||||
return "订单支付{$amount}元";
|
return "订单支付{$amount}元";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -308,10 +308,10 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
$capitalFlowDao = new CapitalFlowLogic($user);
|
$capitalFlowDao = new CapitalFlowLogic($user);
|
||||||
if ($purchase_funds >= $orderRe['price']) {
|
if ($purchase_funds >= $orderRe['price']) {
|
||||||
User::where('id', $orderRe['uid'])->dec('purchase_funds', $orderRe['refund_price'])->update();
|
User::where('id', $orderRe['uid'])->dec('purchase_funds', $orderRe['refund_price'])->update();
|
||||||
$capitalFlowDao->userExpense('user_order_purchase_pay', 'order', $orderRe['id'], $orderRe['refund_price'], '', 1, $orderRe['store_id']);
|
$capitalFlowDao->userExpense('user_balance_recharge_refund', 'order', $orderRe['id'], $orderRe['refund_price'], '', 1, $orderRe['store_id']);
|
||||||
} else {
|
} else {
|
||||||
User::where('id', $orderRe['uid'])->dec('purchase_funds', $purchase_funds)->update();
|
User::where('id', $orderRe['uid'])->dec('purchase_funds', $purchase_funds)->update();
|
||||||
$capitalFlowDao->userExpense('user_order_purchase_pay', 'order', $orderRe['id'], $purchase_funds, '', 1, $orderRe['store_id']);
|
$capitalFlowDao->userExpense('user_balance_recharge_refund', 'order', $orderRe['id'], $purchase_funds, '', 1, $orderRe['store_id']);
|
||||||
}
|
}
|
||||||
//退还 充值得兑换券
|
//退还 充值得兑换券
|
||||||
UserSignLogic::RefundRecharge($orderRe);
|
UserSignLogic::RefundRecharge($orderRe);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user