【7.2.2】更新sqlserver适配

pull/29/head
fengshuonan 2022-03-16 23:22:55 +08:00
parent 5162b2ab22
commit e06f93e340
2 changed files with 36 additions and 0 deletions

View File

@ -54,4 +54,22 @@
end
</select>
<!--根据统计urlId集合获取菜单id集合sql server版本-->
<select id="getMenuIdsByStatUrlIdList" resultType="java.lang.Long" databaseId="mssql">
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 charindex(CAST(stat_url_id AS VARCHAR),
<foreach item="item" collection="statUrlIds" index="index" open="'" separator="," close="'">
${item}
</foreach>
)
</select>
</mapper>

View File

@ -54,4 +54,22 @@
end
</select>
<!--获取一些菜单的统计信息只返回名称路径图标sql server版本-->
<select id="getMenuStatInfoByMenuIds" resultType="cn.stylefeng.roses.kernel.system.modular.menu.entity.SysMenu" databaseId="mssql">
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 charindex(CAST(menu_id AS VARCHAR),
<foreach item="item" collection="menuIds" index="index" open="'" separator="," close="'">
${item}
</foreach>
)
</select>
</mapper>