MenuActionMapper.xml 1.18 KB
<?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="cn.runsa.portal.base.dao.MenuActionMapper" >
<resultMap id="BaseResultMap" type="cn.runsa.portal.base.entity.MenuAction" >
    <id column="meaId" property="id" />
    <result column="meId" property="meId" />
    <result column="meaName" property="name" />
    <result column="meaCode" property="code" />
    <result column="meaSort" property="sort" />
  </resultMap>
 <select id="selectListByMid" parameterType="list" resultMap="BaseResultMap">
		select t2.* from  smMenuAction t2 
		where t2.meId in
		 <foreach item="item" index="index" collection="list" open="(" separator="," close=")" >
	      #{item}
	    </foreach>		
 </select>
 <delete id="deleteActionByRoleId" parameterType="java.lang.Integer">
       delete from smRoleMenuAction where roId=#{roId}
 </delete>
 <insert id="insertRoleAction" parameterType="list" >
       insert into smRoleMenuAction(roId,acId) values
       <foreach item="item" index="index" collection="list" separator=","  >
          (#{item.roId},#{item.Id})
       </foreach>
 </insert>
 
 
 
 
</mapper>