|
@@ -0,0 +1,85 @@
|
|
|
|
+<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
+<!DOCTYPE mapper
|
|
|
|
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
+<mapper namespace="com.dgtly.wxportal.mapper.WxSendMessageMapper">
|
|
|
|
+
|
|
|
|
+ <resultMap type="WxSendMessage" id="WxSendMessageResult">
|
|
|
|
+ <result property="id" column="id" />
|
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
|
+ <result property="toUser" column="to_user" />
|
|
|
|
+ <result property="isSuccess" column="is_success" />
|
|
|
|
+ <result property="sendText" column="send_text" />
|
|
|
|
+ <result property="type" column="type" />
|
|
|
|
+ </resultMap>
|
|
|
|
+
|
|
|
|
+ <sql id="selectWxSendMessageVo">
|
|
|
|
+ select id, create_time, to_user, is_success, send_text, type from wx_send_message
|
|
|
|
+ </sql>
|
|
|
|
+
|
|
|
|
+ <select id="selectWxSendMessageList" parameterType="WxSendMessage" resultMap="WxSendMessageResult">
|
|
|
|
+ <include refid="selectWxSendMessageVo"/>
|
|
|
|
+ <where>
|
|
|
|
+ <if test="toUser != null and toUser != ''"> and to_user = #{toUser}</if>
|
|
|
|
+ <if test="isSuccess != null and isSuccess != ''"> and is_success = #{isSuccess}</if>
|
|
|
|
+ <if test="sendText != null and sendText != ''"> and send_text = #{sendText}</if>
|
|
|
|
+ <if test="type != null and type != ''"> and type = #{type}</if>
|
|
|
|
+ </where>
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="selectWxSendMessageById" parameterType="Long" resultMap="WxSendMessageResult">
|
|
|
|
+ <include refid="selectWxSendMessageVo"/>
|
|
|
|
+ where id = #{id}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <insert id="insertWxSendMessage" parameterType="WxSendMessage">
|
|
|
|
+ insert into wx_send_message
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="id != null ">id,</if>
|
|
|
|
+ <if test="createTime != null ">create_time,</if>
|
|
|
|
+ <if test="toUser != null and toUser != ''">to_user,</if>
|
|
|
|
+ <if test="isSuccess != null and isSuccess != ''">is_success,</if>
|
|
|
|
+ <if test="sendText != null and sendText != ''">send_text,</if>
|
|
|
|
+ <if test="type != null and type != ''">type,</if>
|
|
|
|
+ </trim>
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="id != null ">#{id},</if>
|
|
|
|
+ <if test="createTime != null ">#{createTime},</if>
|
|
|
|
+ <if test="toUser != null and toUser != ''">#{toUser},</if>
|
|
|
|
+ <if test="isSuccess != null and isSuccess != ''">#{isSuccess},</if>
|
|
|
|
+ <if test="sendText != null and sendText != ''">#{sendText},</if>
|
|
|
|
+ <if test="type != null and type != ''">#{type},</if>
|
|
|
|
+ </trim>
|
|
|
|
+ </insert>
|
|
|
|
+
|
|
|
|
+ <update id="updateWxSendMessage" parameterType="WxSendMessage">
|
|
|
|
+ update wx_send_message
|
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
|
+ <if test="createTime != null ">create_time = #{createTime},</if>
|
|
|
|
+ <if test="toUser != null and toUser != ''">to_user = #{toUser},</if>
|
|
|
|
+ <if test="isSuccess != null and isSuccess != ''">is_success = #{isSuccess},</if>
|
|
|
|
+ <if test="sendText != null and sendText != ''">send_text = #{sendText},</if>
|
|
|
|
+ <if test="type != null and type != ''">type = #{type},</if>
|
|
|
|
+ </trim>
|
|
|
|
+ where id = #{id}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteWxSendMessageById" parameterType="Long">
|
|
|
|
+ delete from wx_send_message where id = #{id}
|
|
|
|
+ </delete>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteWxSendMessageByIds" parameterType="String">
|
|
|
|
+ delete from wx_send_message where id in
|
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
+ #{id}
|
|
|
|
+ </foreach>
|
|
|
|
+ </delete>
|
|
|
|
+
|
|
|
|
+ <insert id="bathInsertWxSendMessage">
|
|
|
|
+ insert into wx_send_message(create_time, to_user,is_success,send_text,type) values
|
|
|
|
+ <foreach item="item" index="index" collection="list" separator=",">
|
|
|
|
+ (now(),#{item.toUser},#{item.isSuccess},#{item.sendText},#{item.type})
|
|
|
|
+ </foreach>
|
|
|
|
+ </insert>
|
|
|
|
+
|
|
|
|
+</mapper>
|