修改注册时,求职者对应后端的角色

This commit is contained in:
sh
2025-10-27 11:59:10 +08:00
parent a0fd4eb43a
commit 05e215abb0
3 changed files with 13 additions and 4 deletions

View File

@@ -158,7 +158,7 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper,AppUser> imple
//角色集合 //角色集合
Map mapUserRole=new HashMap<>(); Map mapUserRole=new HashMap<>();
switch (appUser.getIsCompanyUser()){ switch (appUser.getIsCompanyUser()){
case "0"://企业 case StringUtil.IS_COMPANY_USER://企业
if(registerBody.getCompany()!=null){ if(registerBody.getCompany()!=null){
Company company=registerBody.getCompany(); Company company=registerBody.getCompany();
Long companyId=company.getCompanyId(); Long companyId=company.getCompanyId();
@@ -175,7 +175,7 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper,AppUser> imple
appUser.setIdCard(company.getCode()); appUser.setIdCard(company.getCode());
appUser.setName(company.getName()); appUser.setName(company.getName());
} }
mapUserRole.put("roleId",100); mapUserRole.put("roleId",StringUtil.SYS_QY);
break; break;
default://求职者 default://求职者
if(registerBody.getExperiencesList()!=null){ if(registerBody.getExperiencesList()!=null){
@@ -190,7 +190,7 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper,AppUser> imple
}); });
appSkillMapper.batchInsert(registerBody.getAppSkillsList()); appSkillMapper.batchInsert(registerBody.getAppSkillsList());
} }
mapUserRole.put("roleId",1); mapUserRole.put("roleId",StringUtil.SYS_QZZ);
} }
//保存sys_user //保存sys_user
SysUser sysUser=new SysUser(); SysUser sysUser=new SysUser();

View File

@@ -17,6 +17,15 @@ public class StringUtil {
*/ */
public static final String IS_COMPANY_USER = "0"; 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){ public static Boolean isEmptyOrNull(String s){
if(Objects.isNull(s)){return true;} if(Objects.isNull(s)){return true;}
return s.isEmpty(); return s.isEmpty();

View File

@@ -132,7 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult"> <select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult">
<include refid="selectUserVo"/> <include refid="selectUserVo"/>
where u.user_name = #{userName} and u.del_flag = '0' where u.user_name = #{userName} and u.del_flag = '0' order by create_time desc LIMIT 1
</select> </select>
<select id="selectUserById" parameterType="Long" resultMap="SysUserResult"> <select id="selectUserById" parameterType="Long" resultMap="SysUserResult">