You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
1.0 KiB

<?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.daqing.financial.hrms.dao.DeptPositionDao">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="com.daqing.framework.domain.hrms.DeptPositionEntity" id="deptPositionMap">
<result property="id" column="id"/>
<result property="deptId" column="dept_id"/>
<result property="positionId" column="position_id"/>
</resultMap>
<insert id="saveBatch" parameterType="java.util.List">
INSERT INTO hrms_dept_position (id, dept_id, position_id)
VALUES
<foreach collection="list" index="index" separator="," item="item">
(#{item.id}, #{item.deptId}, #{item.positionId})
</foreach>
</insert>
<delete id="deleteByPositionId">
DELETE
FROM
hrms_dept_position
WHERE
position_id = #{positionId}
</delete>
</mapper>