Commit 246819c1 by 李小龙

fixbug:

parent 2cd78f91
...@@ -396,8 +396,8 @@ public class PlatOrgServiceImpl extends ServiceImpl<PlatOrgMapper, PlatOrg> ...@@ -396,8 +396,8 @@ public class PlatOrgServiceImpl extends ServiceImpl<PlatOrgMapper, PlatOrg>
*/ */
@Override @Override
public List<PlatOrg> belongToOrgTree(PlatOrg param) { public List<PlatOrg> belongToOrgTree(PlatOrg param) {
PlatUserVO userVO = PlatUserUtil.getUserVO(); PlatUserVO userVOCanNull = PlatUserUtil.getUserVOCanNull();
String isTenant = userVO.getIsTenant(); String isTenant = userVOCanNull.getIsTenant();
//如果是租户账号 则有所有权限 //如果是租户账号 则有所有权限
if (StringUtils.equals(isTenant, CommonEnum.YES.getValue())) { if (StringUtils.equals(isTenant, CommonEnum.YES.getValue())) {
List<PlatOrg> orgList = this.list(new LambdaQueryWrapper<PlatOrg>() List<PlatOrg> orgList = this.list(new LambdaQueryWrapper<PlatOrg>()
...@@ -408,7 +408,7 @@ public class PlatOrgServiceImpl extends ServiceImpl<PlatOrgMapper, PlatOrg> ...@@ -408,7 +408,7 @@ public class PlatOrgServiceImpl extends ServiceImpl<PlatOrgMapper, PlatOrg>
} }
//平台账号 //平台账号
Set<String> orgIdList = getOrgIdListByUserId(userVO.getId()); Set<String> orgIdList = getOrgIdListByUserId(userVOCanNull.getId());
List<PlatOrg> orgList = this.list(new LambdaQueryWrapper<PlatOrg>() List<PlatOrg> orgList = this.list(new LambdaQueryWrapper<PlatOrg>()
.eq(StringUtils.isNotEmpty(param.getType()), PlatOrg::getType, param.getType()) .eq(StringUtils.isNotEmpty(param.getType()), PlatOrg::getType, param.getType())
.in(BaseEntity::getId, orgIdList).eq(PlatOrg::getStatus, CommonEnum.YES.getValue())); .in(BaseEntity::getId, orgIdList).eq(PlatOrg::getStatus, CommonEnum.YES.getValue()));
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.makeit.mapper.platform.auth.PlatUserRoleMapper">
<select id="getByUserIdList" resultType="com.makeit.dto.platform.auth.PlatUserRoleDTO">
select distinct pur.role_id,
pur.user_id,
pr.name as roleName
from plat_user_role pur
left join plat_role pr on pur.role_id = pr.id
<where>
<if test="userIdList != null and userIdList.size()>0">
AND pur.user_id IN
<foreach collection="userIdList" item="item" separator="," open="(" close=")" index="">
#{item}
</foreach>
</if>
</where>
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment