| | |
| | | |
| | | <resultMap type="com.smartor.domain.IvrTask" id="IvrTaskResult"> |
| | | <result property="taskid" column="taskid"/> |
| | | <result property="taskname" column="taskname"/> |
| | | <result property="taskName" column="task_name"/> |
| | | <result property="templateid" column="templateid"/> |
| | | <result property="templatename" column="templatename"/> |
| | | <result property="labelinfo" column="labelinfo"/> |
| | | <result property="state" column="state"/> |
| | | <result property="count" column="count"/> |
| | | <result property="executed" column="executed"/> |
| | | <result property="unexecuted" column="unexecuted"/> |
| | | <result property="fail" column="fail"/> |
| | | <result property="userid" column="userid"/> |
| | | <result property="username" column="username"/> |
| | | <result property="addtime" column="addtime"/> |
| | | <result property="checkuserid" column="checkuserid"/> |
| | | <result property="checkusername" column="checkusername"/> |
| | | <result property="checktime" column="checktime"/> |
| | | <result property="type" column="type"/> |
| | | <result property="typename" column="typename"/> |
| | | <result property="usebqsms" column="usebqsms"/> |
| | | <result property="usebhsms" column="usebhsms"/> |
| | | <result property="usesendsms" column="usesendsms"/> |
| | | <result property="deptcode" column="deptcode"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="updateBy" column="update_by"/> |
| | |
| | | <result property="isupload" column="isupload"/> |
| | | <result property="uploadTime" column="upload_time"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <result property="pid" column="pid"/> |
| | | <result property="guid" column="guid"/> |
| | | <result property="preachform" column="preachform"/> |
| | | <result property="sendType" column="send_type"/> |
| | | <result property="sendState" column="send_state"/> |
| | | <result property="hospType" column="hosp_type"/> |
| | | <result property="taskDesc" column="task_desc"/> |
| | | <result property="libtemplateid" column="libtemplateid"/> |
| | | <result property="libtemplatename" column="libtemplatename"/> |
| | | <result property="sendTimeSlot" column="send_time_slot"/> |
| | | <result property="stopState" column="stop_state"/> |
| | | <result property="showDate" column="show_date"/> |
| | | <result property="showTimeMorn" column="show_time_morn"/> |
| | | <result property="showTimeNoon" column="show_time_noon"/> |
| | | <result property="showTimeNight" column="show_time_night"/> |
| | | <result property="textParam" column="text_param"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectIvrTaskVo"> |
| | | select taskid, |
| | | taskname, |
| | | task_name, |
| | | show_date, |
| | | show_time_morn, |
| | | show_time_noon, |
| | | show_time_night, |
| | | libtemplateid, |
| | | libtemplatename, |
| | | stop_state, |
| | | text_param, |
| | | templateid, |
| | | templatename, |
| | | labelinfo, |
| | | state, |
| | | count, |
| | | executed, |
| | | unexecuted, |
| | | fail, |
| | | userid, |
| | | username, |
| | | addtime, |
| | | checkuserid, |
| | | checkusername, |
| | | checktime, |
| | | type, |
| | | task_desc, |
| | | hosp_type, |
| | | typename, |
| | | usebqsms, |
| | | usebhsms, |
| | | usesendsms, |
| | | deptcode, |
| | | del_flag, |
| | | update_by, |
| | |
| | | create_time, |
| | | isupload, |
| | | upload_time, |
| | | pid, |
| | | guid, |
| | | preachform, |
| | | send_type, |
| | | send_state, |
| | | send_time_slot, |
| | | orgid |
| | | from ivr_task |
| | | </sql> |
| | |
| | | <select id="selectIvrTaskList" parameterType="com.smartor.domain.IvrTask" resultMap="IvrTaskResult"> |
| | | <include refid="selectIvrTaskVo"/> |
| | | <where> |
| | | <if test="taskname != null and taskname != ''">and taskname like concat('%', #{taskname}, '%')</if> |
| | | <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}, |
| | | '%') |
| | | </if> |
| | | <if test="templateid != null and templateid != ''">and templateid = #{templateid}</if> |
| | | <if test="templatename != null and templatename != ''">and templatename like concat('%', #{templatename}, |
| | | '%') |
| | | </if> |
| | | <if test="labelinfo != null and labelinfo != ''">and labelinfo = #{labelinfo}</if> |
| | | <if test="state != null ">and state = #{state}</if> |
| | | <if test="count != null ">and count = #{count}</if> |
| | | <if test="executed != null ">and executed = #{executed}</if> |
| | | <if test="unexecuted != null ">and unexecuted = #{unexecuted}</if> |
| | | <if test="fail != null ">and fail = #{fail}</if> |
| | | <if test="userid != null and userid != ''">and userid = #{userid}</if> |
| | | <if test="username != null and username != ''">and username like concat('%', #{username}, '%')</if> |
| | | <if test="addtime != null ">and addtime = #{addtime}</if> |
| | | <if test="checkuserid != null and checkuserid != ''">and checkuserid = #{checkuserid}</if> |
| | | <if test="checkusername != null and checkusername != ''">and checkusername like concat('%', |
| | | #{checkusername}, '%') |
| | |
| | | <if test="checktime != null ">and checktime = #{checktime}</if> |
| | | <if test="type != null and type != ''">and type = #{type}</if> |
| | | <if test="typename != null and typename != ''">and typename like concat('%', #{typename}, '%')</if> |
| | | <if test="usebqsms != null ">and usebqsms = #{usebqsms}</if> |
| | | <if test="usebhsms != null ">and usebhsms = #{usebhsms}</if> |
| | | <if test="usesendsms != null ">and usesendsms = #{usesendsms}</if> |
| | | <if test="deptcode != null and deptcode != ''">and deptcode = #{deptcode}</if> |
| | | <if test="isupload != null ">and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="hospType != null and hospType != ''">and hosp_type = #{hospType}</if> |
| | | <if test="libtemplateid != null ">and libtemplateid = #{libtemplateid}</if> |
| | | <if test="libtemplatename != null and libtemplatename != ''">and libtemplatename = #{libtemplatename}</if> |
| | | </where> |
| | | order by upeate_time desc,taskid desc |
| | | order by update_time desc,taskid desc |
| | | </select> |
| | | |
| | | <select id="selectIvrTaskByTaskid" parameterType="Long" resultMap="IvrTaskResult"> |
| | |
| | | keyProperty="taskid"> |
| | | insert into ivr_task |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="taskid != null">taskid,</if> |
| | | <if test="taskname != null">taskname,</if> |
| | | <if test="taskName != null">task_name,</if> |
| | | <if test="templateid != null">templateid,</if> |
| | | <if test="templatename != null">templatename,</if> |
| | | <if test="labelinfo != null">labelinfo,</if> |
| | | <if test="state != null">state,</if> |
| | | <if test="count != null">count,</if> |
| | | <if test="executed != null">executed,</if> |
| | | <if test="unexecuted != null">unexecuted,</if> |
| | | <if test="fail != null">fail,</if> |
| | | <if test="userid != null">userid,</if> |
| | | <if test="username != null">username,</if> |
| | | <if test="addtime != null">addtime,</if> |
| | | <if test="checkuserid != null">checkuserid,</if> |
| | | <if test="checkusername != null">checkusername,</if> |
| | | <if test="checktime != null">checktime,</if> |
| | | <if test="type != null">type,</if> |
| | | <if test="typename != null">typename,</if> |
| | | <if test="usebqsms != null">usebqsms,</if> |
| | | <if test="usebhsms != null">usebhsms,</if> |
| | | <if test="usesendsms != null">usesendsms,</if> |
| | | <if test="deptcode != null">deptcode,</if> |
| | | <if test="delFlag != null and delFlag != ''">del_flag,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | |
| | | <if test="isupload != null">isupload,</if> |
| | | <if test="uploadTime != null">upload_time,</if> |
| | | <if test="orgid != null">orgid,</if> |
| | | <if test="pid != null">pid,</if> |
| | | <if test="guid != null">guid,</if> |
| | | <if test="preachform != null">preachform,</if> |
| | | <if test="sendType != null">send_type,</if> |
| | | <if test="sendState != null">send_state,</if> |
| | | <if test="hospType != null and hospType != ''">hosp_type,</if> |
| | | |
| | | <if test="taskDesc != null and taskDesc != ''">task_desc,</if> |
| | | <if test="libtemplateid != null ">libtemplateid,</if> |
| | | <if test="libtemplatename != null and libtemplatename != ''">libtemplatename,</if> |
| | | <if test="sendTimeSlot != null and sendTimeSlot != ''">send_time_slot,</if> |
| | | <if test="stopState != null">stop_state,</if> |
| | | <if test="showDate != null and showDate != ''">show_date,</if> |
| | | <if test="showTimeNight != null and showTimeNight != ''">show_time_night,</if> |
| | | <if test="showTimeNoon != null and showTimeNoon != ''">show_time_noon,</if> |
| | | <if test="showTimeMorn != null and showTimeMorn != ''">show_time_morn,</if> |
| | | <if test="textParam != null and textParam != ''">text_param,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="taskid != null">#{taskid},</if> |
| | | <if test="taskname != null">#{taskname},</if> |
| | | <if test="taskName != null">#{taskName},</if> |
| | | <if test="templateid != null">#{templateid},</if> |
| | | <if test="templatename != null">#{templatename},</if> |
| | | <if test="labelinfo != null">#{labelinfo},</if> |
| | | <if test="state != null">#{state},</if> |
| | | <if test="count != null">#{count},</if> |
| | | <if test="executed != null">#{executed},</if> |
| | | <if test="unexecuted != null">#{unexecuted},</if> |
| | | <if test="fail != null">#{fail},</if> |
| | | <if test="userid != null">#{userid},</if> |
| | | <if test="username != null">#{username},</if> |
| | | <if test="addtime != null">#{addtime},</if> |
| | | <if test="checkuserid != null">#{checkuserid},</if> |
| | | <if test="checkusername != null">#{checkusername},</if> |
| | | <if test="checktime != null">#{checktime},</if> |
| | | <if test="type != null">#{type},</if> |
| | | <if test="typename != null">#{typename},</if> |
| | | <if test="usebqsms != null">#{usebqsms},</if> |
| | | <if test="usebhsms != null">#{usebhsms},</if> |
| | | <if test="usesendsms != null">#{usesendsms},</if> |
| | | <if test="deptcode != null">#{deptcode},</if> |
| | | <if test="delFlag != null and delFlag != ''">#{delFlag},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | |
| | | <if test="isupload != null">#{isupload},</if> |
| | | <if test="uploadTime != null">#{uploadTime},</if> |
| | | <if test="orgid != null">#{orgid},</if> |
| | | <if test="pid != null">#{pid},</if> |
| | | <if test="guid != null">#{guid},</if> |
| | | <if test="preachform != null">#{preachform},</if> |
| | | <if test="sendType != null">#{sendType},</if> |
| | | <if test="sendState != null">#{sendState},</if> |
| | | <if test="hospType != null and hospType != ''">#{hospType},</if> |
| | | <if test="taskDesc != null and taskDesc != ''">#{taskDesc},</if> |
| | | <if test="libtemplateid != null ">#{libtemplateid},</if> |
| | | <if test="libtemplatename != null and libtemplatename != ''">#{libtemplatename},</if> |
| | | <if test="sendTimeSlot != null and sendTimeSlot != ''">#{sendTimeSlot},</if> |
| | | <if test="stopState != null">#{stopState},</if> |
| | | <if test="showDate != null and showDate != ''">#{showDate},</if> |
| | | <if test="showTimeNight != null and showTimeNight != ''">#{showTimeNight},</if> |
| | | <if test="showTimeNoon != null and showTimeNoon != ''">#{showTimeNoon},</if> |
| | | <if test="showTimeMorn != null and showTimeMorn != ''">#{showTimeMorn},</if> |
| | | <if test="textParam != null and textParam != ''">#{textParam},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateIvrTask" parameterType="com.smartor.domain.IvrTask"> |
| | | update ivr_task |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="taskname != null">taskname = #{taskname},</if> |
| | | <if test="taskName != null">task_name = #{taskName},</if> |
| | | <if test="templateid != null">templateid = #{templateid},</if> |
| | | <if test="templatename != null">templatename = #{templatename},</if> |
| | | <if test="labelinfo != null">labelinfo = #{labelinfo},</if> |
| | | <if test="state != null">state = #{state},</if> |
| | | <if test="count != null">count = #{count},</if> |
| | | <if test="executed != null">executed = #{executed},</if> |
| | | <if test="unexecuted != null">unexecuted = #{unexecuted},</if> |
| | | <if test="fail != null">fail = #{fail},</if> |
| | | <if test="userid != null">userid = #{userid},</if> |
| | | <if test="username != null">username = #{username},</if> |
| | | <if test="addtime != null">addtime = #{addtime},</if> |
| | | <if test="checkuserid != null">checkuserid = #{checkuserid},</if> |
| | | <if test="checkusername != null">checkusername = #{checkusername},</if> |
| | | <if test="checktime != null">checktime = #{checktime},</if> |
| | | <if test="type != null">type = #{type},</if> |
| | | <if test="typename != null">typename = #{typename},</if> |
| | | <if test="usebqsms != null">usebqsms = #{usebqsms},</if> |
| | | <if test="usebhsms != null">usebhsms = #{usebhsms},</if> |
| | | <if test="usesendsms != null">usesendsms = #{usesendsms},</if> |
| | | <if test="deptcode != null">deptcode = #{deptcode},</if> |
| | | <if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | |
| | | <if test="isupload != null">isupload = #{isupload},</if> |
| | | <if test="uploadTime != null">upload_time = #{uploadTime},</if> |
| | | <if test="orgid != null">orgid = #{orgid},</if> |
| | | <if test="pid != null">pid = #{pid},</if> |
| | | <if test="guid != null">guid = #{guid},</if> |
| | | <if test="preachform != null">preachform = #{preachform},</if> |
| | | <if test="sendType != null">send_type = #{sendType},</if> |
| | | <if test="sendState != null">send_state = #{sendState},</if> |
| | | <if test="hospType != null and hospType != ''">hosp_type = #{hospType},</if> |
| | | <if test="taskDesc != null and taskDesc != ''">task_desc= #{taskDesc},</if> |
| | | <if test="libtemplateid != null ">libtemplateid = #{libtemplateid},</if> |
| | | <if test="libtemplatename != null and libtemplatename != ''">libtemplatename = #{libtemplatename},</if> |
| | | <if test="sendTimeSlot != null and sendTimeSlot != ''">send_time_slot=#{sendTimeSlot},</if> |
| | | <if test="stopState != null ">stop_state=#{stopState},</if> |
| | | <if test="showDate != null and showDate != ''">show_date=#{showDate},</if> |
| | | <if test="showTimeNight != null and showTimeNight != ''">show_time_night=#{showTimeNight},</if> |
| | | <if test="showTimeNoon != null and showTimeNoon != ''">show_time_noon=#{showTimeNoon},</if> |
| | | <if test="showTimeMorn != null and showTimeMorn != ''">show_time_morn=#{showTimeMorn},</if> |
| | | <if test="textParam != null and textParam != ''">text_param=#{textParam},</if> |
| | | </trim> |
| | | where taskid = #{taskid} |
| | | </update> |