修复部门删除时sql解析异常
This commit is contained in:
parent
927589fd3f
commit
f30f3b24ea
@ -44,9 +44,7 @@ public interface RoleMapper extends BaseMapper<Role> {
|
|||||||
|
|
||||||
List<Role> findAll(@Param("criteria") RoleQueryCriteria criteria);
|
List<Role> findAll(@Param("criteria") RoleQueryCriteria criteria);
|
||||||
|
|
||||||
@Select("select count(*) from sys_role r, sys_roles_depts d where " +
|
int countByDepts(@Param("deptIds") Set<Long> deptIds);
|
||||||
"r.role_id = d.role_id and d.dept_id in ?1")
|
|
||||||
int countByDepts(Set<Long> deptIds);
|
|
||||||
|
|
||||||
@Select("SELECT role.role_id as id FROM sys_role role, sys_roles_menus rm " +
|
@Select("SELECT role.role_id as id FROM sys_role role, sys_roles_menus rm " +
|
||||||
"WHERE role.role_id = rm.role_id AND rm.menu_id = #{menuId}")
|
"WHERE role.role_id = rm.role_id AND rm.menu_id = #{menuId}")
|
||||||
|
@ -112,4 +112,14 @@
|
|||||||
left join sys_users_roles ur on role.role_id = ur.role_id
|
left join sys_users_roles ur on role.role_id = ur.role_id
|
||||||
WHERE role.role_id = ur.role_id AND ur.user_id = #{userId}
|
WHERE role.role_id = ur.role_id AND ur.user_id = #{userId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="countByDepts" resultType="int">
|
||||||
|
select count(*)
|
||||||
|
from sys_role r, sys_roles_depts d
|
||||||
|
where r.role_id = d.role_id
|
||||||
|
and d.dept_id in
|
||||||
|
<foreach collection="deptIds" item="deptId" open="(" separator="," close=")">
|
||||||
|
#{deptId}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue
Block a user