| | |
| | | <id property="createTime" column="create_time" /> |
| | | <id property="updateTime" column="update_time" /> |
| | | <id property="fromDepartmentalId" column="from_departmental_id" /> |
| | | <id property="videoUrl" column="video_url" /> |
| | | <id property="pictureUrl" column="picture_url" /> |
| | | <id property="guideOrderNum" column="guide_order_num" /> |
| | | <id property="isTimeout" column="is_timeout" /> |
| | | |
| | | </resultMap> |
| | | |
| | |
| | | SELECT |
| | | id, |
| | | departmental_id, |
| | | (select user_name from automessage_sys_user where a.to_user_id=user_id)toUserName, |
| | | (select user_name from automessage_sys_user where a.from_user_id=user_id)fromUserName, |
| | | to_user_id, |
| | | from_user_id, |
| | | state, |
| | |
| | | accessory_name, |
| | | accessory_url, |
| | | from_departmental_id, |
| | | video_url, |
| | | picture_url, |
| | | create_time, |
| | | update_time |
| | | update_time, |
| | | guide_order_num, |
| | | is_timeout |
| | | FROM |
| | | guide_evolve |
| | | automessage_guide_evolve a |
| | | </sql> |
| | | |
| | | <select id="selectConfigList" resultMap="GuideEvolveResult"> |
| | |
| | | |
| | | |
| | | <insert id="insertConfig" parameterType="com.dg.core.db.gen.entity.GuideEvolveEntity"> |
| | | insert into guide_evolve ( |
| | | <if test="id != null">id,</if> |
| | | insert into automessage_guide_evolve ( |
| | | <if test="departmentalId != null and departmentalId != '' ">departmental_id,</if> |
| | | <if test="toUserId != null and toUserId != '' ">to_user_id,</if> |
| | | <if test="fromUserId != null and fromUserId != '' ">from_user_id,</if> |
| | |
| | | <if test="accessoryName != null and accessoryName != '' ">accessory_name,</if> |
| | | <if test="accessoryUrl != null and accessoryUrl != '' ">accessory_url,</if> |
| | | <if test="fromDepartmentalId != null and fromDepartmentalId != '' ">from_departmental_id,</if> |
| | | <if test="videoUrl != null and videoUrl != '' ">video_url,</if> |
| | | <if test="pictureUrl != null and pictureUrl != '' ">picture_url,</if> |
| | | <if test="guidOrderNum != null and guidOrderNum != '' ">guide_order_num,</if> |
| | | <if test="isTimeout != null and isTimeout != '' ">is_timeout,</if> |
| | | update_time, |
| | | create_time |
| | | )values( |
| | |
| | | <if test="accessoryName != null and accessoryName != '' ">#{accessoryName},</if> |
| | | <if test="accessoryUrl != null and accessoryUrl != '' ">#{accessoryUrl},</if> |
| | | <if test="fromDepartmentalId != null and fromDepartmentalId != '' ">#{fromDepartmentalId},</if> |
| | | <if test="videoUrl != null and videoUrl != '' ">#{videoUrl},</if> |
| | | <if test="pictureUrl != null and pictureUrl != '' ">#{pictureUrl},</if> |
| | | <if test="guidOrderNum != null and guidOrderNum != '' ">#{guidOrderNum},</if> |
| | | <if test="isTimeout != null and isTimeout != '' ">#{isTimeout},</if> |
| | | sysdate(), |
| | | sysdate() |
| | | ) |
| | | </insert> |
| | | |
| | | <update id="updateConfig" parameterType="com.dg.core.db.gen.entity.GuideEvolveEntity"> |
| | | update guide_evolve |
| | | update automessage_guide_evolve |
| | | <set> |
| | | <if test="departmentalId != null and departmentalId != '' ">departmental_id=#{departmentalId},</if> |
| | | <if test="toUserId != null and toUserId != '' ">to_user_id=#{toUserId},</if> |
| | |
| | | <if test="accessoryName != null and accessoryName != '' ">accessory_name=#{accessoryName},</if> |
| | | <if test="accessoryUrl != null and accessoryUrl != '' ">accessory_url=#{accessoryUrl},</if> |
| | | <if test="fromDepartmentalId != null and fromDepartmentalId != '' ">from_departmental_id=#{fromDepartmentalId},</if> |
| | | <if test="videoUrl != null and videoUrl != '' ">video_url=#{videoUrl},</if> |
| | | <if test="pictureUrl != null and pictureUrl != '' ">picture_url=#{pictureUrl},</if> |
| | | <if test="isTimeout != null and isTimeout != '' ">is_timeout=#{isTimeout},</if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id= #{Id} |
| | | </update> |
| | | |
| | | <update id="updateGuid" parameterType="com.dg.core.db.gen.entity.GuideEvolveEntity"> |
| | | UPDATE automessage_guide_evolve |
| | | SET guide_id = (SELECT id from automessage_guide_repair_order where order_num=automessage_guide_evolve.guide_order_num ) |
| | | WHERE guide_id IS NULL |
| | | </update> |
| | | |
| | | <delete id="deleteConfigById" parameterType="string"> |
| | | delete from guide_evolve where id= #{Id} |
| | | delete from automessage_guide_evolve where id= #{Id} |
| | | </delete> |
| | | |
| | | <select id="countNum" resultType="integer"> |
| | | select count(id) from guide_evolve |
| | | select count(id) from automessage_guide_evolve |
| | | </select> |
| | | |
| | | <!-- 首页统计使用 勿动 --> |
| | | <select id="countStatisticsNum" resultType="integer"> |
| | | select count(id) from automessage_guide_evolve |
| | | <where> |
| | | <if test="state != null and state != ''"> |
| | | and automessage_guide_evolve.state=#{state} |
| | | </if> |
| | | <if test="isTimeout != null and isTimeout != ''"> |
| | | and automessage_guide_evolve.is_timeout=#{isTimeout} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </mapper> |
| | | |
| | | |