优化:运营中心 - 餐厅代理申请通过时 - 默认生成的商户信息不在使用手机号作为账号,而是随机生成11位字符串

This commit is contained in:
wuhui_zzw 2024-05-30 16:07:32 +08:00
parent 97f24cf7aa
commit 36dba452c5
1 changed files with 6 additions and 2 deletions

View File

@ -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'],