修改注册时,求职者对应后端的角色
This commit is contained in:
@@ -158,7 +158,7 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper,AppUser> imple
|
||||
//角色集合
|
||||
Map mapUserRole=new HashMap<>();
|
||||
switch (appUser.getIsCompanyUser()){
|
||||
case "0"://企业
|
||||
case StringUtil.IS_COMPANY_USER://企业
|
||||
if(registerBody.getCompany()!=null){
|
||||
Company company=registerBody.getCompany();
|
||||
Long companyId=company.getCompanyId();
|
||||
@@ -175,7 +175,7 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper,AppUser> imple
|
||||
appUser.setIdCard(company.getCode());
|
||||
appUser.setName(company.getName());
|
||||
}
|
||||
mapUserRole.put("roleId",100);
|
||||
mapUserRole.put("roleId",StringUtil.SYS_QY);
|
||||
break;
|
||||
default://求职者
|
||||
if(registerBody.getExperiencesList()!=null){
|
||||
@@ -190,7 +190,7 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper,AppUser> imple
|
||||
});
|
||||
appSkillMapper.batchInsert(registerBody.getAppSkillsList());
|
||||
}
|
||||
mapUserRole.put("roleId",1);
|
||||
mapUserRole.put("roleId",StringUtil.SYS_QZZ);
|
||||
}
|
||||
//保存sys_user
|
||||
SysUser sysUser=new SysUser();
|
||||
|
||||
@@ -17,6 +17,15 @@ public class StringUtil {
|
||||
*/
|
||||
public static final String IS_COMPANY_USER = "0";
|
||||
|
||||
/**
|
||||
* pc端-求职者
|
||||
*/
|
||||
public static final String SYS_QZZ = "2";
|
||||
/**
|
||||
* pc端-企业
|
||||
*/
|
||||
public static final String SYS_QY = "100";
|
||||
|
||||
public static Boolean isEmptyOrNull(String s){
|
||||
if(Objects.isNull(s)){return true;}
|
||||
return s.isEmpty();
|
||||
|
||||
Reference in New Issue
Block a user