文件名从 smartor/src/main/resources/mapper/smartor/IvrTaskMapper.xml 修改 |
| | |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.smartor.mapper.IvrTaskMapper"> |
| | | <mapper namespace="com.smartor.mapper.ServiceTaskMapper"> |
| | | |
| | | <resultMap type="com.smartor.domain.IvrTask" id="IvrTaskResult"> |
| | | <resultMap type="com.smartor.domain.ServiceTask" id="ServiceTaskResult"> |
| | | <result property="taskid" column="taskid"/> |
| | | <result property="taskName" column="task_name"/> |
| | | <result property="templateid" column="templateid"/> |
| | |
| | | <result property="textParam" column="text_param"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectIvrTaskVo"> |
| | | <sql id="selectServiceTaskVo"> |
| | | select taskid, |
| | | task_name, |
| | | show_date, |
| | |
| | | send_state, |
| | | send_time_slot, |
| | | orgid |
| | | from ivr_task |
| | | from service_task |
| | | </sql> |
| | | |
| | | <select id="selectIvrTaskList" parameterType="com.smartor.domain.IvrTask" resultMap="IvrTaskResult"> |
| | | <include refid="selectIvrTaskVo"/> |
| | | <select id="selectServiceTaskList" parameterType="com.smartor.domain.ServiceTask" resultMap="ServiceTaskResult"> |
| | | <include refid="selectServiceTaskVo"/> |
| | | <where> |
| | | <if test="taskName != null and taskName != ''">and task_name like concat('%', #{taskName}, '%')</if> |
| | | <if test="sendTimeSlot != null and sendTimeSlot != ''">and send_time_slot like concat('%', #{sendTimeSlot}, |
| | |
| | | order by update_time desc,taskid desc |
| | | </select> |
| | | |
| | | <select id="selectIvrTaskByTaskid" parameterType="Long" resultMap="IvrTaskResult"> |
| | | <include refid="selectIvrTaskVo"/> |
| | | <select id="selectServiceTaskByTaskid" parameterType="Long" resultMap="ServiceTaskResult"> |
| | | <include refid="selectServiceTaskVo"/> |
| | | where taskid = #{taskid} |
| | | </select> |
| | | |
| | | <insert id="insertIvrTask" parameterType="com.smartor.domain.IvrTask" useGeneratedKeys="true" |
| | | <insert id="insertServiceTask" parameterType="com.smartor.domain.ServiceTask" useGeneratedKeys="true" |
| | | keyProperty="taskid"> |
| | | insert into ivr_task |
| | | insert into service_task |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="taskName != null">task_name,</if> |
| | | <if test="templateid != null">templateid,</if> |
| | |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateIvrTask" parameterType="com.smartor.domain.IvrTask"> |
| | | update ivr_task |
| | | <update id="updateServiceTask" parameterType="com.smartor.domain.ServiceTask"> |
| | | update service_task |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="taskName != null">task_name = #{taskName},</if> |
| | | <if test="templateid != null">templateid = #{templateid},</if> |
| | |
| | | where taskid = #{taskid} |
| | | </update> |
| | | |
| | | <update id="deleteIvrTaskByTaskid" parameterType="Long"> |
| | | update ivr_task |
| | | <update id="deleteServiceTaskByTaskid" parameterType="Long"> |
| | | update service_task |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag =1 |
| | | </trim> |
| | | where taskid = #{taskid} |
| | | </update> |
| | | |
| | | <update id="deleteIvrTaskByTaskids" parameterType="String"> |
| | | update ivr_task |
| | | <update id="deleteServiceTaskByTaskids" parameterType="String"> |
| | | update service_task |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag =1 |
| | | </trim> |