| | |
| | | <mapper namespace="com.smartor.mapper.IvrTaskTemplateMapper"> |
| | | |
| | | <resultMap type="com.smartor.domain.IvrTaskTemplate" id="IvrTaskTemplateResult"> |
| | | <result property="ID" column="ID"/> |
| | | <result property="id" column="id"/> |
| | | <result property="taskid" column="taskid"/> |
| | | <result property="taskname" column="taskname"/> |
| | | <result property="targetid" column="targetid"/> |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectIvrTaskTemplateVo"> |
| | | select ID, |
| | | select id, |
| | | taskid, |
| | | recallcount, |
| | | instruction, |
| | |
| | | <include refid="selectIvrTaskTemplateVo"/> |
| | | <where> |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | | <if test="id != null ">and id = #{id}</if> |
| | | <if test="taskname != null and taskname != ''">and taskname like concat('%', #{taskname}, '%')</if> |
| | | <if test="targetid != null ">and targetid = #{targetid}</if> |
| | | <if test="targetname != null and targetname != ''">and targetname like concat('%', #{targetname}, '%')</if> |
| | |
| | | |
| | | <select id="selectIvrTaskTemplateByID" parameterType="Long" resultMap="IvrTaskTemplateResult"> |
| | | <include refid="selectIvrTaskTemplateVo"/> |
| | | where ID = #{ID} |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertIvrTaskTemplate" parameterType="com.smartor.domain.IvrTaskTemplate" useGeneratedKeys="true" |
| | | keyProperty="ID"> |
| | | keyProperty="id"> |
| | | insert into ivr_task_template |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="taskid != null">taskid,</if> |
| | |
| | | <if test="libtemplatename != null ">libtemplatename = #{libtemplatename},</if> |
| | | <if test="instruction != null ">instruction = #{instruction},</if> |
| | | </trim> |
| | | where ID = #{ID} |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteIvrTaskTemplateByID" parameterType="Long"> |
| | | delete |
| | | from ivr_task_template |
| | | where ID = #{ID} |
| | | where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteIvrTaskTemplateByIDs" parameterType="String"> |
| | | delete from ivr_task_template where ID in |
| | | <foreach item="ID" collection="array" open="(" separator="," close=")"> |
| | | #{ID} |
| | | delete from ivr_task_template where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |