diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index dc63ef3d7..e58fbfcb3 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -106,7 +106,7 @@ class PayNotifyLogic extends BaseLogic ]; self::dealGoodsLeft($checkArr, $order['uid'], $order['id']); } - if ($extra && $extra['store_id']) { + if ($extra && $extra['store_id'] && $order['reservation'] !=1) { $params = [ 'verify_code' => $order['verify_code'], 'store_id' => $extra['store_id'], @@ -208,7 +208,7 @@ class PayNotifyLogic extends BaseLogic // } // self::addUserSing($order); self::afterPay($order); - if ($extra && $extra['store_id']) { + if ($extra && $extra['store_id'] && $order['reservation'] !=1) { $params = [ 'verify_code' => $order['verify_code'], 'store_id' => $extra['store_id'], @@ -617,7 +617,7 @@ class PayNotifyLogic extends BaseLogic /** * 现金支付 */ - public static function cash_pay($orderSn) + public static function cash_pay($orderSn,$extra =[]) { $order = StoreOrder::where('order_id', $orderSn)->findOrEmpty(); @@ -642,6 +642,15 @@ class PayNotifyLogic extends BaseLogic self::descStock($order['id']); } + if ($extra && $extra['store_id'] && $order['reservation'] !=1) { + $params = [ + 'verify_code' => $order['verify_code'], + 'store_id' => $extra['store_id'], + 'staff_id' => $extra['staff_id'] + ]; + OrderLogic::writeOff($params); + } + // Redis::send('push-platform-print', ['id' => $order['id']]); return true; diff --git a/app/store/controller/store_order/StoreOrderController.php b/app/store/controller/store_order/StoreOrderController.php index 03f2eaad1..3114b9795 100644 --- a/app/store/controller/store_order/StoreOrderController.php +++ b/app/store/controller/store_order/StoreOrderController.php @@ -228,7 +228,10 @@ class StoreOrderController extends BaseAdminController return $this->success('礼品券支付成功', ['id' => $order['id']]); case PayEnum::CASH_PAY: //现金支付 - PayNotifyLogic::handle('cash_pay', $order['order_id']); + PayNotifyLogic::handle('cash_pay', $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']]); case PayEnum::WECHAT_PAY_BARCODE: