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