Explorar o código

看板查询增加权限后的BUG修改

chenw %!s(int64=6) %!d(string=hai) anos
pai
achega
c38a8f524e

+ 2 - 1
bi-server/src/main/java/com/usoftchina/bi/server/dao/dashboard/DashboardsMapper.java

@@ -109,7 +109,8 @@ public interface DashboardsMapper {
             " from BI_DASHBOARDS where (id in " +
             " (select bo_da_id from bi_DASHBOARDS_object " +
             " where (bo_type = '0' and bo_ob_id in (select br_user_group from bi_user_rel_groups where br_user_id= #{userId}))" +
-            " or (BO_TYPE='1' and bo_ob_id = #{userId} )) or create_id = #{userId}) and id = #{id}")
+            " or (BO_TYPE='1' and bo_ob_id = #{userId} )) or create_id = #{userId} " +
+            "or id in (select bpu_dashboardid from bi_power_users where bpu_userid = #{userId} or bpu_usergroupid in (select br_user_group from bi_user_rel_groups where br_user_id = #{userId})) ) and id = #{id}")
     @Results(id = "DashBoardsResultMap", value = {
             @Result(column = "id", property = "id", jdbcType = JdbcType.INTEGER),
             @Result(column = "bdName", property = "bdName", jdbcType = JdbcType.VARCHAR),