文件名从 smartor/src/main/resources/mapper/smartor/IvrTaskSingleMapper.xml 修改 |
| | |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.smartor.mapper.IvrTaskSingleMapper"> |
| | | <mapper namespace="com.smartor.mapper.ServiceSubtaskMapper"> |
| | | |
| | | <resultMap type="com.smartor.domain.IvrTaskSingle" id="IvrTaskcallResult"> |
| | | <resultMap type="com.smartor.domain.ServiceSubtask" id="ServiceSubtaskResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="sendname" column="sendname"/> |
| | | <result property="phone" column="phone"/> |
| | |
| | | <result property="libtemplateid" column="libtemplateid"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectIvrTaskcallVo"> |
| | | <sql id="selectServiceSubtaskVo"> |
| | | select id, |
| | | hosp_type, |
| | | libtemplateid, |
| | |
| | | deptname, |
| | | stop_state, |
| | | diagname |
| | | from ivr_task_single |
| | | from service_subtask |
| | | </sql> |
| | | |
| | | <select id="selectIvrTaskcallList" parameterType="com.smartor.domain.IvrTaskSingle" resultMap="IvrTaskcallResult"> |
| | | <include refid="selectIvrTaskcallVo"/> |
| | | <select id="selectServiceSubtaskList" parameterType="com.smartor.domain.ServiceSubtask" resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | <if test="sendname != null and sendname != ''">and sendname like concat('%', #{sendname}, '%')</if> |
| | |
| | | order by update_time desc,id desc |
| | | </select> |
| | | |
| | | <select id="selectIvrTaskcallById" parameterType="Long" resultMap="IvrTaskcallResult"> |
| | | <include refid="selectIvrTaskcallVo"/> |
| | | <select id="selectServiceSubtaskById" parameterType="Long" resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertIvrTaskcall" parameterType="com.smartor.domain.IvrTaskSingle" useGeneratedKeys="true" |
| | | <insert id="insertServiceSubtask" parameterType="com.smartor.domain.ServiceSubtask" useGeneratedKeys="true" |
| | | keyProperty="id"> |
| | | insert into ivr_task_single |
| | | insert into service_subtask |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="sendname != null">sendname,</if> |
| | | <if test="phone != null">phone,</if> |
| | |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateIvrTaskcall" parameterType="com.smartor.domain.IvrTaskSingle"> |
| | | update ivr_task_single |
| | | <update id="updateServiceSubtask" parameterType="com.smartor.domain.ServiceSubtask"> |
| | | update service_subtask |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="sendname != null">sendname = #{sendname},</if> |
| | | <if test="phone != null">phone = #{phone},</if> |
| | |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="updateIvrTaskcallByCondition" parameterType="com.smartor.domain.IvrTaskSingle"> |
| | | update ivr_task_single |
| | | <update id="updateServiceSubtaskByCondition" parameterType="com.smartor.domain.ServiceSubtask"> |
| | | update service_subtask |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="sendname != null">sendname = #{sendname},</if> |
| | | <if test="phone != null">phone = #{phone},</if> |
| | |
| | | where patid = #{patid} and taskid = #{taskid} |
| | | </update> |
| | | |
| | | <update id="deleteIvrTaskcallById" parameterType="Long"> |
| | | update ivr_task_single |
| | | <update id="deleteServiceSubtaskById" parameterType="Long"> |
| | | update service_subtask |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag =1 |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deleteIvrTaskcallByCondition" > |
| | | update ivr_task_single |
| | | <update id="deleteServiceSubtaskByCondition" > |
| | | update service_subtask |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag =1 |
| | | </trim> |
| | | where patid = #{patid} and taskid = #{taskid} |
| | | </update> |
| | | |
| | | <select id="getDataByTime" resultMap="IvrTaskcallResult"> |
| | | <select id="getDataByTime" resultMap="ServiceSubtaskResult"> |
| | | |
| | | select id, |
| | | sendname, |
| | |
| | | patid, |
| | | deptname, |
| | | diagname |
| | | FROM ivr_task_single, |
| | | FROM service_subtask, |
| | | JSON_TABLE(send_time_slot, '$[*]' COLUMNS ( |
| | | begantime DATETIME PATH '$.begantime', |
| | | endtime DATETIME PATH '$.endtime' |