From 2f3acf42d9c01c1f1faec15c65eaf52f39558a30 Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Mon, 5 Feb 2024 14:09:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E4=BB=85=E6=99=AE?= =?UTF-8?q?=E9=80=9A=E5=95=86=E6=88=B7=E6=94=AF=E6=8C=81=E4=B9=B0=E5=8D=95?= =?UTF-8?q?=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/store/order/OnlinePay.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/controller/api/store/order/OnlinePay.php b/app/controller/api/store/order/OnlinePay.php index 8b5c510..607a7a0 100644 --- a/app/controller/api/store/order/OnlinePay.php +++ b/app/controller/api/store/order/OnlinePay.php @@ -52,6 +52,11 @@ class OnlinePay extends BaseController{ if (!in_array($payInfo['pay_type'], StoreOrderRepository::PAY_TYPE, true)) return app('json')->fail('请选择正确的支付方式'); if ((float)$payInfo['money'] <= 0) return app('json')->fail('支付金额必须大于0!'); if ((int)$payInfo['mer_id'] <= 0) return app('json')->fail('请选择商户!'); + // 判断:当前商户是否支持买单 商户类别:0=普通商户,1=酒道馆,2=供应商 + $merchantType = (int)app()->make(MerchantRepository::class)->getSearch([]) + ->where('mer_id', (int)$payInfo['mer_id']) + ->value('merchant_type'); + if($merchantType != 0) return app('json')->fail('该商户不支持当前操作!'); // 发起支付 $groupOrder = app() ->make(LockService::class)