mapper.task-actor.xml Maven / Gradle / Ivy
<?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="TaskActor"> <insert id="SAVE" parameterType="taskactor"> insert into wf_task_actor (task_Id, actor_Id) values (#{taskId, jdbcType=VARCHAR},#{actorId, jdbcType=VARCHAR}) </insert> <delete id="DELETE" parameterType="string"> delete from wf_task_actor where task_Id = #{taskId, jdbcType=VARCHAR} </delete> <delete id="REDUCE" parameterType="hashmap"> delete from wf_task_actor where task_Id = #{taskId, jdbcType=VARCHAR} <if test="actorIds.length > 0"> and actor_Id in <foreach collection="actorIds" index="index" item="item" open="(" separator="," close=")"> #{item, jdbcType=VARCHAR} </foreach> </if> </delete> <select id="SELECTLIST" resultType="taskactor"> select task_Id as taskId, actor_Id as actorId from wf_task_actor where task_Id = #{id, jdbcType=VARCHAR} </select> </mapper>