From 36dba452c54029773461566d44e724452a3d347b Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Thu, 30 May 2024 16:07:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E8=BF=90=E8=90=A5?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=20-=20=E9=A4=90=E5=8E=85=E4=BB=A3=E7=90=86?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=E9=80=9A=E8=BF=87=E6=97=B6=20-=20=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E7=94=9F=E6=88=90=E7=9A=84=E5=95=86=E6=88=B7=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E4=B8=8D=E5=9C=A8=E4=BD=BF=E7=94=A8=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=E5=8F=B7=E4=BD=9C=E4=B8=BA=E8=B4=A6=E5=8F=B7=EF=BC=8C=E8=80=8C?= =?UTF-8?q?=E6=98=AF=E9=9A=8F=E6=9C=BA=E7=94=9F=E6=88=9011=E4=BD=8D?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E4=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repositories/marketing/AgentApplyRepository.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/common/repositories/marketing/AgentApplyRepository.php b/app/common/repositories/marketing/AgentApplyRepository.php index 92a1385..49c3c47 100644 --- a/app/common/repositories/marketing/AgentApplyRepository.php +++ b/app/common/repositories/marketing/AgentApplyRepository.php @@ -237,12 +237,16 @@ class AgentApplyRepository extends BaseRepository{ $agentId = Agent::insertGetId($insertInfo); // 判断:如果是餐厅 生成商户信息 if((int)$insertInfo['agent_type'] == 7){ - $password = substr($applyInfo['contact_phone'],-6); + $password = substr($applyInfo['contact_phone'],-6); $config = systemConfig(['broadcast_room_type', 'broadcast_goods_type']); + // 商户账号 默认随机生成 + $characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; + $merAccount = substr(str_shuffle($characters), 0, 11); + $merchant = app()->make(MerchantRepository::class)->createMerchant([ 'mer_name' => $applyInfo['mer_name'], 'mer_phone' => $applyInfo['contact_phone'], - 'mer_account' => $applyInfo['contact_phone'], + 'mer_account' => $merAccount, 'category_id' => $applyInfo['mer_class_id'], 'type_id' => $applyInfo['mer_type_id'], 'real_name' => $applyInfo['contact_name'],