12345678910111213141516171819202122232425262728293031323334 |
- <?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">
- <mapper namespace="com.juxiao.xchat.module.system.mapper.RoleMenuMapper">
- <resultMap type="com.juxiao.xchat.module.system.domain.RoleMenu" id="RoleMenuResult">
- <result property="roleId" column="role_id" />
- <result property="menuId" column="menu_id" />
- </resultMap>
- <delete id="deleteRoleMenuByRoleId" parameterType="java.lang.Long">
- delete from sys_role_menu where role_id=#{roleId}
- </delete>
-
- <select id="selectCountRoleMenuByMenuId" resultType="java.lang.Integer">
- select count(1) from sys_role_menu where menu_id=#{menuId}
- </select>
-
- <delete id="deleteRoleMenu" parameterType="java.lang.Long">
- delete from sys_role_menu where role_id in
- <foreach collection="array" item="roleId" open="(" separator="," close=")">
- #{roleId}
- </foreach>
- </delete>
-
- <insert id="batchRoleMenu">
- insert into sys_role_menu(role_id, menu_id) values
- <foreach item="item" index="index" collection="list" separator=",">
- (#{item.roleId},#{item.menuId})
- </foreach>
- </insert>
-
- </mapper>
|