mirror of
https://gitcode.com/ageerle/ruoyi-ai.git
synced 2026-04-03 15:06:11 +00:00
feat: 全局格式化代码
This commit is contained in:
@@ -8,21 +8,26 @@
|
||||
</resultMap>
|
||||
|
||||
<select id="selectDeptList" resultMap="SysDeptResult">
|
||||
select * from sys_dept ${ew.getCustomSqlSegment}
|
||||
select *
|
||||
from sys_dept ${ew.getCustomSqlSegment}
|
||||
</select>
|
||||
|
||||
<select id="selectDeptById" resultMap="SysDeptResult">
|
||||
select * from sys_dept where del_flag = '0' and dept_id = #{deptId}
|
||||
select *
|
||||
from sys_dept
|
||||
where del_flag = '0'
|
||||
and dept_id = #{deptId}
|
||||
</select>
|
||||
|
||||
<select id="selectDeptListByRoleId" resultType="Long">
|
||||
select d.dept_id
|
||||
from sys_dept d
|
||||
left join sys_role_dept rd on d.dept_id = rd.dept_id
|
||||
left join sys_role_dept rd on d.dept_id = rd.dept_id
|
||||
where rd.role_id = #{roleId}
|
||||
<if test="deptCheckStrictly">
|
||||
and d.dept_id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.dept_id = rd.dept_id and rd.role_id = #{roleId})
|
||||
</if>
|
||||
<if test="deptCheckStrictly">
|
||||
and d.dept_id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.dept_id =
|
||||
rd.dept_id and rd.role_id = #{roleId})
|
||||
</if>
|
||||
order by d.parent_id, d.order_num
|
||||
</select>
|
||||
|
||||
|
||||
@@ -8,13 +8,26 @@
|
||||
</resultMap>
|
||||
|
||||
<select id="selectMenuListByUserId" resultMap="SysMenuResult">
|
||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query_param, m.visible, m.status,
|
||||
m.perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
|
||||
select distinct m.menu_id,
|
||||
m.parent_id,
|
||||
m.menu_name,
|
||||
m.path,
|
||||
m.component,
|
||||
m.query_param,
|
||||
m.visible,
|
||||
m.status,
|
||||
m.perms,
|
||||
m.is_frame,
|
||||
m.is_cache,
|
||||
m.menu_type,
|
||||
m.icon,
|
||||
m.order_num,
|
||||
m.create_time
|
||||
from sys_menu m
|
||||
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
||||
left join sys_user_role sur on rm.role_id = sur.role_id
|
||||
left join sys_role ro on sur.role_id = ro.role_id
|
||||
${ew.getCustomSqlSegment}
|
||||
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
||||
left join sys_user_role sur on rm.role_id = sur.role_id
|
||||
left join sys_role ro on sur.role_id = ro.role_id
|
||||
${ew.getCustomSqlSegment}
|
||||
</select>
|
||||
|
||||
<select id="selectMenuTreeByUserId" parameterType="Long" resultMap="SysMenuResult">
|
||||
@@ -79,7 +92,8 @@
|
||||
select distinct m.perms
|
||||
from sys_menu m
|
||||
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
||||
where m.status = '0' and rm.role_id = #{roleId}
|
||||
where m.status = '0'
|
||||
and rm.role_id = #{roleId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -5,5 +5,4 @@
|
||||
<mapper namespace="org.ruoyi.system.mapper.SysNoticeMapper">
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?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">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.ruoyi.system.mapper.SysNoticeStateMapper">
|
||||
|
||||
<update id="readAllNotice">
|
||||
UPDATE sys_notice_state SET read_status = 1
|
||||
UPDATE sys_notice_state
|
||||
SET read_status = 1
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?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">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.ruoyi.system.mapper.SysOssConfigMapper">
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?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">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.ruoyi.system.mapper.SysTenantMapper">
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?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">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.ruoyi.system.mapper.SysTenantPackageMapper">
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -5,9 +5,10 @@
|
||||
<mapper namespace="org.ruoyi.system.mapper.SysUserRoleMapper">
|
||||
|
||||
<select id="selectUserIdsByRoleId" resultType="Long">
|
||||
select u.user_id from sys_user u
|
||||
inner join sys_user_role sur
|
||||
on u.user_id = sur.user_id and sur.role_id = #{roleId}
|
||||
select u.user_id
|
||||
from sys_user u
|
||||
inner join sys_user_role sur
|
||||
on u.user_id = sur.user_id and sur.role_id = #{roleId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user