Commit bd6f35ad by levphon

bug修复

1 parent 639cb9b0
......@@ -24,6 +24,8 @@ public interface UserMapper extends CommonBaseMapper<User> {
List<User> selectByTenantId(@Param("tenantId") Long tenantId);
List<User> selectByTenantIds(@Param("tenantIds") Collection<Long> tenantIds);
List<User> selectByDepartmentId(@Param("departmentId") Long departmentId);
List<OrgModel> selectUserOrgModelById(@Param("id") Long id);
......
......@@ -207,6 +207,12 @@ public class DepartmentService {
List<Long> subUserIdList = userPathList.stream().map(UserPath::getSubId).collect(Collectors.toList());
return userMapper.selectByIds(subUserIdList);
} else if (assignTenants.getCode().equals(role.getRolePermissionType())) {
List<Tenant> tenantList = this.getRolePermissionTenants();
List<Long> tenantIdList = tenantList.stream().map(Tenant::getId).collect(Collectors.toList());
return userMapper.selectByTenantIds(tenantIdList);
}
return userList;
}
......
......@@ -58,10 +58,22 @@
</select>
<select id="selectByTenantId" resultMap="BaseResultMap">
select *
select
<include refid="Base_Column_List"/>
from t_user
where tenant_id = #{tenantId}
and del_flag = 0
where del_flag = 0
and tenant_id = #{tenantId}
</select>
<select id="selectByTenantIds" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from t_user
where del_flag = 0
and tenant_id in
<foreach collection="tenantIds" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</select>
<select id="selectByDepartmentId" resultMap="BaseResultMap">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!