文件名从 smartor/src/main/resources/mapper/smartor/IvrTaskcallMapper.xml 修改 |
| | |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.smartor.mapper.IvrTaskcallMapper"> |
| | | <mapper namespace="com.smartor.mapper.IvrTaskSingleMapper"> |
| | | |
| | | <resultMap type="com.smartor.domain.IvrTaskcall" id="IvrTaskcallResult"> |
| | | <resultMap type="com.smartor.domain.IvrTaskSingle" id="IvrTaskcallResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="sendname" column="sendname"/> |
| | | <result property="phone" column="phone"/> |
| | |
| | | <result property="preachcontent" column="preachcontent"/> |
| | | <result property="sendType" column="send_type"/> |
| | | <result property="sendTimeSlot" column="send_time_slot"/> |
| | | <result property="taskName" column="task_name"/> |
| | | <result property="taskDesc" column="task_desc"/> |
| | | <result property="operator" column="operator"/> |
| | | <result property="operatorNo" column="operator_no"/> |
| | | <result property="hospno" column="hospno"/> |
| | | <result property="hospType" column="hosp_type"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectIvrTaskcallVo"> |
| | | select id, |
| | | sendname, |
| | | hosp_type, |
| | | hospno, |
| | | phone, |
| | | sex, |
| | | age, |
| | |
| | | send_type, |
| | | medical_record_no, |
| | | send_time_slot, |
| | | task_name, |
| | | task_desc, |
| | | operator_no, |
| | | operator, |
| | | preachcontent |
| | | from ivr_taskcall |
| | | </sql> |
| | | |
| | | <select id="selectIvrTaskcallList" parameterType="com.smartor.domain.IvrTaskcall" resultMap="IvrTaskcallResult"> |
| | | <select id="selectIvrTaskcallList" parameterType="com.smartor.domain.IvrTaskSingle" resultMap="IvrTaskcallResult"> |
| | | <include refid="selectIvrTaskcallVo"/> |
| | | <where> |
| | | <if test="sendname != null and sendname != ''">and sendname like concat('%', #{sendname}, '%')</if> |
| | |
| | | </if> |
| | | <if test="preachcontent != null and preachcontent != ''">and preachcontent = #{preachcontent}</if> |
| | | <if test="sendType != null and sendType != ''">and send_type = #{sendType}</if> |
| | | <if test="operator != null and operator != ''">and operator = #{operator}</if> |
| | | <if test="operatorNo != null and operatorNo != ''">and operator_no = #{operatorNo}</if> |
| | | </where> |
| | | order by update_time desc,id desc |
| | | </select> |
| | | |
| | | <select id="selectIvrTaskcallById" parameterType="Long" resultMap="IvrTaskcallResult"> |
| | |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertIvrTaskcall" parameterType="com.smartor.domain.IvrTaskcall" useGeneratedKeys="true" keyProperty="id"> |
| | | <insert id="insertIvrTaskcall" parameterType="com.smartor.domain.IvrTaskSingle" useGeneratedKeys="true" |
| | | keyProperty="id"> |
| | | insert into ivr_taskcall |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="sendname != null">sendname,</if> |
| | |
| | | <if test="medicalRecordNo != null and medicalRecordNo != ''">medical_record_no,</if> |
| | | <if test="preachcontent != null and preachcontent != ''">preachcontent,</if> |
| | | <if test="sendType != null and sendType != ''">send_type,</if> |
| | | <if test="taskName != null and taskName != ''">task_name,</if> |
| | | <if test="taskDesc != null and taskDesc != ''">task_desc,</if> |
| | | <if test="operator != null and operator != ''">operator,</if> |
| | | <if test="operatorNo != null and operatorNo != ''">operator_no,</if> |
| | | <if test="hospType != null and hospType != ''">hosp_type,</if> |
| | | <if test="hospno != null and hospno != ''">hospno,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="sendname != null">#{sendname},</if> |
| | |
| | | <if test="medicalRecordNo != null and medicalRecordNo != ''">#{medicalRecordNo},</if> |
| | | <if test="preachcontent != null and preachcontent != ''">#{preachcontent},</if> |
| | | <if test="sendType != null and sendType != ''">#{sendType},</if> |
| | | <if test="taskName != null and taskName != ''">#{taskName},</if> |
| | | <if test="taskDesc != null and taskDesc != ''">#{taskDesc},</if> |
| | | <if test="operator != null and operator != ''">#{operator},</if> |
| | | <if test="operatorNo != null and operatorNo != ''">#{operatorNo},</if> |
| | | <if test="hospType != null and hospType != ''">#{hospType},</if> |
| | | <if test="hospno != null and hospno != ''">#{hospno},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateIvrTaskcall" parameterType="com.smartor.domain.IvrTaskcall"> |
| | | <update id="updateIvrTaskcall" parameterType="com.smartor.domain.IvrTaskSingle"> |
| | | update ivr_taskcall |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="sendname != null">sendname = #{sendname},</if> |
| | |
| | | <if test="medicalRecordNo != null and medicalRecordNo != ''">medical_record_no = #{medicalRecordNo},</if> |
| | | <if test="preachcontent != null and preachcontent != ''">preachcontent = #{preachcontent},</if> |
| | | <if test="sendType != null and sendType != ''">send_type = #{sendType},</if> |
| | | <if test="taskName != null and taskName != ''">task_name = #{taskName},</if> |
| | | <if test="taskDesc != null and taskDesc != ''">task_desc = #{taskDesc},</if> |
| | | <if test="operatorNo != null and operatorNo != ''">operator_no = #{operatorNo},</if> |
| | | <if test="operator != null and operator != ''">operator = #{operator},</if> |
| | | <if test="hospType != null and hospType != ''">hosp_type = #{hospType},</if> |
| | | <if test="hospno != null and hospno != ''">hospno = #{hospno},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | send_type, |
| | | medical_record_no, |
| | | preachcontent, |
| | | task_name, |
| | | task_desc, |
| | | operator_no, |
| | | operator, |
| | | hospno, |
| | | hosp_type, |
| | | send_time_slot |
| | | FROM ivr_taskcall, |
| | | JSON_TABLE(send_time_slot, '$[*]' COLUMNS ( |
| | |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | | </mapper> |