春风项目四线(合箱线、总装线)
懒羊羊
2024-01-18 dbe5f1d0156bd5bef1067c548ff39fe93d10205e
提交 | 用户 | 时间
fd2207 1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE mapper
3 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5 <mapper namespace="com.jcdm.system.mapper.SysRoleMenuMapper">
6
7     <resultMap type="SysRoleMenu" id="SysRoleMenuResult">
8         <result property="roleId"     column="role_id"      />
9         <result property="menuId"     column="menu_id"      />
10     </resultMap>
11     
12     <select id="checkMenuExistRole" resultType="Integer">
13         select count(1) from sys_role_menu where menu_id = #{menuId}
14     </select>
15
16     <delete id="deleteRoleMenuByRoleId" parameterType="Long">
17         delete from sys_role_menu where role_id=#{roleId}
18     </delete>
19     
20     <delete id="deleteRoleMenu" parameterType="Long">
21          delete from sys_role_menu where role_id in
22          <foreach collection="array" item="roleId" open="(" separator="," close=")">
23              #{roleId}
24         </foreach> 
25      </delete>
26     
27     <insert id="batchRoleMenu">
28         insert into sys_role_menu(role_id, menu_id) values
29         <foreach item="item" index="index" collection="list" separator=",">
30             (#{item.roleId},#{item.menuId})
31         </foreach>
32     </insert>
33     
34 </mapper>