登录 增加1.2
parent
d0df3dfe88
commit
e578b6f42a
|
@ -91,7 +91,9 @@ public class SysRoleServiceImpl implements ISysRoleService {
|
|||
//-------------------------------------------------------
|
||||
@Override
|
||||
public Set<String> selectEmailRoleByUserId(Integer userId,Integer roleTag) {
|
||||
System.out.println("角色id"+userId+",角色标识"+roleTag);
|
||||
List<String> roleList=roleMapper.selectEmailRoleByUserId(userId,roleTag);
|
||||
System.out.println("用户角色集合是:"+roleList);
|
||||
HashSet<String> roleSet = new HashSet<>();
|
||||
roleSet.addAll(roleList);
|
||||
return roleSet;
|
||||
|
|
|
@ -92,13 +92,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<include refid="selectRoleVo"/>
|
||||
where r.role_key=#{roleKey} and r.del_flag = '0' limit 1
|
||||
</select>
|
||||
<!--用户角色sql-->
|
||||
<select id="selectEmailRoleByUserId" resultType="java.lang.String">
|
||||
SELECT role_name FROM tb_user_role ur
|
||||
LEFT JOIN
|
||||
tb_role r on ur.role_id=r.role_id
|
||||
where ur.user_id=#{userId} and ur.role_tag=#{roleTag}
|
||||
LEFT JOIN
|
||||
tb_role r on ur.role_id=r.role_id
|
||||
where ur.user_id=#{userId} and ur.role_tag=#{roleTag}
|
||||
</select>
|
||||
<!--用户角色sql-->
|
||||
|
||||
|
||||
<insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId">
|
||||
insert into sys_role(
|
||||
|
|
Loading…
Reference in New Issue