feat(StoreOrderController): 添加采购款支付处理逻辑
This commit is contained in:
parent
b5b364a3d1
commit
4b686647c4
@ -24,7 +24,7 @@ class UserValidate extends BaseValidate
|
|||||||
'nickname' => 'require',
|
'nickname' => 'require',
|
||||||
'account' => 'require',
|
'account' => 'require',
|
||||||
'password' => 'require',
|
'password' => 'require',
|
||||||
'mobile' => 'require|mobile',
|
'mobile' => 'require|unique:user',
|
||||||
'is_disable' => 'in:0,1',
|
'is_disable' => 'in:0,1',
|
||||||
'sex' => 'in:1,2',
|
'sex' => 'in:1,2',
|
||||||
'province' => 'require',
|
'province' => 'require',
|
||||||
|
@ -357,7 +357,7 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
$financeLogic->in($transaction_id, $store_profit, OrderEnum::MERCHANT_ORDER_OBTAINS, $order['store_id'], 0, 0, $order['pay_type']); //平台手续费
|
$financeLogic->in($transaction_id, $store_profit, OrderEnum::MERCHANT_ORDER_OBTAINS, $order['store_id'], 0, 0, $order['pay_type']); //平台手续费
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($order['is_vip'] >= 1) {
|
// if ($order['is_vip'] >= 1) {
|
||||||
if ($order['spread_uid'] > 0) {
|
if ($order['spread_uid'] > 0) {
|
||||||
$financeLogic->other_arr['vip_uid'] = $order['spread_uid'];
|
$financeLogic->other_arr['vip_uid'] = $order['spread_uid'];
|
||||||
$fees = bcdiv(bcmul($order['pay_price'], '0.08', 2), 1, 2);
|
$fees = bcdiv(bcmul($order['pay_price'], '0.08', 2), 1, 2);
|
||||||
@ -427,7 +427,7 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
$financeLogic->in($transaction_id, $fees, OrderEnum::OTHER_ORDER_OBTAINS, $order['store_id'], 0, 0, $order['pay_type']);
|
$financeLogic->in($transaction_id, $fees, OrderEnum::OTHER_ORDER_OBTAINS, $order['store_id'], 0, 0, $order['pay_type']);
|
||||||
$financeLogic->out($transaction_id, $fees, OrderEnum::OTHER_ORDER_OBTAINS, $order['store_id'], $order['staff_id'], 0, $order['pay_type']);
|
$financeLogic->out($transaction_id, $fees, OrderEnum::OTHER_ORDER_OBTAINS, $order['store_id'], $order['staff_id'], 0, $order['pay_type']);
|
||||||
}
|
}
|
||||||
}
|
// }
|
||||||
$fees = bcsub($order['pay_price'], $count_frees, 2);
|
$fees = bcsub($order['pay_price'], $count_frees, 2);
|
||||||
//供应链订单获得
|
//供应链订单获得
|
||||||
if ($fees > 0) {
|
if ($fees > 0) {
|
||||||
|
@ -207,9 +207,11 @@ class StoreOrderController extends BaseAdminController
|
|||||||
if (!$order) {
|
if (!$order) {
|
||||||
return $this->fail('订单不存在或已支付');
|
return $this->fail('订单不存在或已支付');
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($pay_type) {
|
switch ($pay_type) {
|
||||||
|
case PayEnum::PURCHASE_FUNDS:
|
||||||
|
//采购款支付
|
||||||
|
PayNotifyLogic::handle('purchase_funds', $order['order_id'], ['uid' => $order['uid']]);
|
||||||
|
return $this->success('采购款支付成功', ['id' => $order['id']]);
|
||||||
case PayEnum::CASH_PAY:
|
case PayEnum::CASH_PAY:
|
||||||
//现金支付
|
//现金支付
|
||||||
PayNotifyLogic::handle('cash_pay', $order['order_id']);
|
PayNotifyLogic::handle('cash_pay', $order['order_id']);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user