【7.2.2】更新pgsql版本适配

pull/29/head
fengshuonan 2022-03-16 22:41:35 +08:00
parent 76634fb280
commit 5162b2ab22
3 changed files with 38 additions and 1 deletions

View File

@ -36,4 +36,22 @@
</foreach>,stat_url_id)
</select>
<!--根据统计urlId集合获取菜单id集合pgsql版本-->
<select id="getMenuIdsByStatUrlIdList" resultType="java.lang.Long" databaseId="pgsql">
select stat_menu_id as statMenuId from sys_statistics_url stat
<where>
<if test="statUrlIds != null and statUrlIds.size() > 0">
stat.stat_url_id in
<foreach item="item" collection="statUrlIds" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
order by case stat_url_id
<foreach item="item" collection="statUrlIds" index="index" open="" separator="," close="">
when ${item} then ${index}
</foreach>
end
</select>
</mapper>

View File

@ -223,8 +223,9 @@ public class HomePageServiceImpl implements HomePageService, HomePageServiceApi
}
// 查询缓存用户在库中的统计记录
List<Long> userIdsLong = userIds.stream().map(Long::valueOf).collect(Collectors.toList());
List<SysStatisticsCount> sysStatisticsCounts = sysStatisticsCountService.list(
Wrappers.lambdaQuery(SysStatisticsCount.class).in(SysStatisticsCount::getUserId, userIds));
Wrappers.lambdaQuery(SysStatisticsCount.class).in(SysStatisticsCount::getUserId, userIdsLong));
for (SysStatisticsCount cacheItem : cacheCountList) {
boolean haveRecord = false;

View File

@ -36,4 +36,22 @@
</foreach>,menu_id)
</select>
<!--获取一些菜单的统计信息只返回名称路径图标pgsql版本-->
<select id="getMenuStatInfoByMenuIds" resultType="cn.stylefeng.roses.kernel.system.modular.menu.entity.SysMenu" databaseId="pgsql">
select menu_name as menuName, antdv_icon as antdvIcon , antdv_router as antdvRouter from sys_menu menu
<where>
<if test="menuIds != null and menuIds.size() > 0">
menu.menu_id in
<foreach item="item" collection="menuIds" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
order by case menu_id
<foreach item="item" collection="menuIds" index="index" open="" separator="," close="">
when ${item} then ${index}
</foreach>
end
</select>
</mapper>