修改移动端注册时,保存sys_user_role表时的user_id获取

This commit is contained in:
sh
2025-10-27 11:34:02 +08:00
parent a28354f95c
commit a0fd4eb43a
2 changed files with 3 additions and 1 deletions

View File

@@ -205,7 +205,7 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper,AppUser> imple
sysUser.setIdCard(appUser.getIdCard()); sysUser.setIdCard(appUser.getIdCard());
appUserMapper.insertSysUser(sysUser); appUserMapper.insertSysUser(sysUser);
//保存sys_user_role //保存sys_user_role
mapUserRole.put("userId",appUser.getUserId()); mapUserRole.put("userId",sysUser.getUserId());
appUserMapper.insertSysUserRole(mapUserRole); appUserMapper.insertSysUserRole(mapUserRole);
appUserMapper.updateById(appUser); appUserMapper.updateById(appUser);
return appUser; return appUser;

View File

@@ -87,6 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''">status,</if> <if test="status != null and status != ''">status,</if>
<if test="createBy != null and createBy != ''">create_by,</if> <if test="createBy != null and createBy != ''">create_by,</if>
<if test="remark != null and remark != ''">remark,</if> <if test="remark != null and remark != ''">remark,</if>
<if test="idCard != null and idCard != ''">id_card,</if>
create_time create_time
)values( )values(
<if test="userId != null and userId != ''">#{userId},</if> <if test="userId != null and userId != ''">#{userId},</if>
@@ -101,6 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''">#{status},</if> <if test="status != null and status != ''">#{status},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if> <if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="remark != null and remark != ''">#{remark},</if> <if test="remark != null and remark != ''">#{remark},</if>
<if test="idCard != null and idCard != ''">#{idCard},</if>
sysdate() sysdate()
) )
</insert> </insert>