This commit is contained in:
mkm 2023-08-21 09:59:40 +08:00
parent 2860bbcfd3
commit 18c491baea

View File

@ -91,6 +91,11 @@ class CompanyLogic extends BaseLogic
$admin_id=Admin::strict(false)->insertGetId($admin);
if($params['company_type']==16){
AdminLogic::insertRole($admin_id, [3]);
}elseif($params['company_type']==17){
AdminLogic::insertRole($admin_id, [4]);
}
elseif ($params['company_type']==18) {
AdminLogic::insertRole($admin_id, [6]);
}
$userSn = User::createUserSn();
$admin['admin_id']=$admin_id;
@ -101,6 +106,8 @@ class CompanyLogic extends BaseLogic
$admin['nickname']=$params['master_name'];
$admin['mobile']=$params['master_phone'];
$admin['phone']=$params['master_phone'];
$admin['create_time']=time();
$admin['update_time']=time();
$user_id=User::strict(false)->insertGetId($admin);
Company::where('id',$data['id'])->update(['admin_id'=>$admin_id,'user_id'=>$user_id]);