优化:仅普通商户支持买单操作

This commit is contained in:
wuhui_zzw 2024-02-05 14:09:55 +08:00
parent 92076147f8
commit 2f3acf42d9
1 changed files with 5 additions and 0 deletions

View File

@ -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)