feat(store_order): 添加余额支付和采购款支付的退款功能
This commit is contained in:
parent
5fd9781f49
commit
d1203b48e5
@ -181,6 +181,7 @@ class StoreOrderLogic extends BaseLogic
|
||||
}
|
||||
//余额支付 采购款支付
|
||||
if (in_array($detail['pay_type'], [PayEnum::BALANCE_PAY, PayEnum::PURCHASE_FUNDS])) {
|
||||
PayNotifyLogic::balance_purchase_refund($detail);
|
||||
StoreOrderCartInfo::where('oid', $detail['id'])->update(['is_pay' => -1]);
|
||||
return '退款成功';
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ class PayNotifyLogic extends BaseLogic
|
||||
UserProductStorageLogic::add($order);
|
||||
}
|
||||
// 减去采购款
|
||||
$user = User::update(['purchase_funds' => bcsub($user['purchase_funds'], $order['pay_price'], 2)], ['id' => $user['id']]);
|
||||
User::update(['purchase_funds' => bcsub($user['purchase_funds'], $order['pay_price'], 2)], ['id' => $user['id']]);
|
||||
|
||||
$capitalFlowDao = new CapitalFlowLogic($user);
|
||||
$capitalFlowDao->userExpense('user_order_purchase_pay', 'order', $order['id'], $order['pay_price'], '', 18, $order['store_id']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user