diff --git a/app/common/repositories/marketing/AgentRepository.php b/app/common/repositories/marketing/AgentRepository.php index 356175e..f1dbc52 100644 --- a/app/common/repositories/marketing/AgentRepository.php +++ b/app/common/repositories/marketing/AgentRepository.php @@ -98,6 +98,18 @@ class AgentRepository extends BaseRepository{ $path = 'pages/store/settled/index'; return app()->make(QrcodeService::class)->createQrCode($valueData,$path); break; + case 'shopMer': + // 参数长度超过 简写:aid=agent_id;mt=merchant_type + $valueData = 'aid=' . $params['agent_id'].'&mt=1'; + $path = 'pages/store/settled/index'; + return app()->make(QrcodeService::class)->createQrCode($valueData,$path); + break; + case 'mer': + // 参数长度超过 简写:aid=agent_id;mt=merchant_type + $valueData = 'aid=' . $params['agent_id'].'&mt=0'; + $path = 'pages/store/settled/index'; + return app()->make(QrcodeService::class)->createQrCode($valueData,$path); + break; } throw new ValidateException('小程序码生成失败!'); diff --git a/app/common/repositories/system/merchant/MerchantIntentionRepository.php b/app/common/repositories/system/merchant/MerchantIntentionRepository.php index e629066..2f8a46a 100644 --- a/app/common/repositories/system/merchant/MerchantIntentionRepository.php +++ b/app/common/repositories/system/merchant/MerchantIntentionRepository.php @@ -136,8 +136,9 @@ class MerchantIntentionRepository extends BaseRepository 'mer_password' => $password, 'is_margin' => $margin['is_margin'] ?? -1, 'margin' => $margin['margin'] ?? 0, - 'agent_id' => $intention['agent_id'] ?? 0, - 'merchant_type' => $intention['merchant_type'] ?? 0 + 'agent_id' => $intention['merchant_type'] == 1 ? 0 : $intention['agent_id'] ?? 0,// 酒道馆是合伙人邀请加入 不能直接绑定 + 'merchant_type' => $intention['merchant_type'] ?? 0, + 'invite_agent_id' => $intention['agent_id'] ?? 0, ]; $data['fail_msg'] = ''; $smsData = [ diff --git a/app/controller/api/Agent.php b/app/controller/api/Agent.php index 63d9288..0579f09 100644 --- a/app/controller/api/Agent.php +++ b/app/controller/api/Agent.php @@ -35,7 +35,7 @@ class Agent extends BaseController{ return app('json')->success($data); } /** - * Common: 二维码 - 供应商入驻二维码 + * Common: 二维码 * Author: wu-hui * Time: 2024/01/29 17:40 * @return mixed diff --git a/app/controller/api/store/merchant/MerchantIntention.php b/app/controller/api/store/merchant/MerchantIntention.php index 4676141..1e00150 100644 --- a/app/controller/api/store/merchant/MerchantIntention.php +++ b/app/controller/api/store/merchant/MerchantIntention.php @@ -104,7 +104,7 @@ class MerchantIntention extends BaseController // $check = app()->make(SmsService::class)->checkSmsCode($data['phone'],$data['code'],'intention'); $data['mer_type_id'] = (int)$data['mer_type_id']; // if(!$check) throw new ValidateException('验证码不正确'); - if((int)$data['merchant_type'] != 3){ + if(!in_array((int)$data['merchant_type'],[1,3])){ // 判断:商户分类是否存在 $cateIsHas = app()->make(MerchantCategoryRepository::class)->get($data['merchant_category_id']); if(!$cateIsHas) throw new ValidateException('商户分类不存在');