修改收银台采购款支付后调用核销逻辑
This commit is contained in:
parent
efd48e0fa7
commit
8ac8d073f6
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace app\common\logic;
|
namespace app\common\logic;
|
||||||
|
|
||||||
|
use app\api\logic\order\OrderLogic;
|
||||||
use app\common\enum\OrderEnum;
|
use app\common\enum\OrderEnum;
|
||||||
use app\common\enum\PayEnum;
|
use app\common\enum\PayEnum;
|
||||||
use app\common\enum\user\UserShipEnum;
|
use app\common\enum\user\UserShipEnum;
|
||||||
@ -124,6 +125,15 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
self::dealVipAmount($order, PayEnum::PURCHASE_FUNDS);
|
self::dealVipAmount($order, PayEnum::PURCHASE_FUNDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($extra && $extra['store_id']){
|
||||||
|
$params = [
|
||||||
|
'verify_code'=>$order['verify_code'],
|
||||||
|
'store_id'=>$extra['store_id'],
|
||||||
|
'staff_id'=>$extra['staff_id']
|
||||||
|
];
|
||||||
|
OrderLogic::writeOff($params);
|
||||||
|
}
|
||||||
|
|
||||||
// self::afterPay($order);
|
// self::afterPay($order);
|
||||||
// Redis::send('push-platform-print', ['id' => $order['id']], 60);
|
// Redis::send('push-platform-print', ['id' => $order['id']], 60);
|
||||||
// PushService::push('store_merchant_' . $order['store_id'], $order['store_id'], ['type' => 'store_merchant', 'msg' => '您有一笔新的订单']);
|
// PushService::push('store_merchant_' . $order['store_id'], $order['store_id'], ['type' => 'store_merchant', 'msg' => '您有一笔新的订单']);
|
||||||
@ -252,10 +262,10 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
$order->paid = 1;
|
$order->paid = 1;
|
||||||
$order->pay_time = time();
|
$order->pay_time = time();
|
||||||
$order->status = 2;
|
$order->status = 2;
|
||||||
self::afterPay($order);
|
|
||||||
if (!$order->save()) {
|
if (!$order->save()) {
|
||||||
throw new \Exception('订单保存出错');
|
throw new \Exception('订单保存出错');
|
||||||
}
|
}
|
||||||
|
self::afterPay($order);
|
||||||
$cashFlowLogic = new CashFlowLogic();
|
$cashFlowLogic = new CashFlowLogic();
|
||||||
$cashFlowLogic->insert($order['store_id'], $order['pay_price']);
|
$cashFlowLogic->insert($order['store_id'], $order['pay_price']);
|
||||||
// Redis::send('push-platform-print', ['id' => $order['id']]);
|
// Redis::send('push-platform-print', ['id' => $order['id']]);
|
||||||
|
@ -146,7 +146,10 @@ class StoreOrderController extends BaseAdminController
|
|||||||
switch ($pay_type) {
|
switch ($pay_type) {
|
||||||
case PayEnum::PURCHASE_FUNDS:
|
case PayEnum::PURCHASE_FUNDS:
|
||||||
//采购款支付
|
//采购款支付
|
||||||
PayNotifyLogic::handle('purchase_funds', $order['order_id'], ['uid' => $uid]);
|
PayNotifyLogic::handle('purchase_funds', $order['order_id'], [
|
||||||
|
'uid' => $uid,'store_id'=>$this->request->adminInfo['store_id'],
|
||||||
|
'staff_id'=>$this->request->adminInfo['admin_id']
|
||||||
|
]);
|
||||||
return $this->success('采购款支付成功', ['id' => $order['id']]);
|
return $this->success('采购款支付成功', ['id' => $order['id']]);
|
||||||
|
|
||||||
case PayEnum::CASH_PAY:
|
case PayEnum::CASH_PAY:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user