| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- <?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.fs.wxcid.mapper.WxMsgLogMapper">
-
- <resultMap type="WxMsgLog" id="WxMsgLogResult">
- <result property="id" column="id" />
- <result property="accountId" column="account_id" />
- <result property="key" column="key" />
- <result property="type" column="type" />
- <result property="msgId" column="msg_id" />
- <result property="fromUserName" column="from_user_name" />
- <result property="toUserName" column="to_user_name" />
- <result property="msgType" column="msg_type" />
- <result property="content" column="content" />
- <result property="imgStatus" column="img_status" />
- <result property="imgBuf" column="img_buf" />
- <result property="pushContent" column="push_content" />
- <result property="newMsgId" column="new_msg_id" />
- <result property="createTime" column="create_time" />
- <result property="createBy" column="create_by" />
- <result property="updateTime" column="update_time" />
- <result property="updateBy" column="update_by" />
- <result property="remark" column="remark" />
- </resultMap>
- <sql id="selectWxMsgLogVo">
- select id, account_id, key, type, msg_id, from_user_name, to_user_name, msg_type, content, img_status, img_buf, push_content, new_msg_id, create_time, create_by, update_time, update_by, remark from wx_msg_log
- </sql>
- <select id="selectWxMsgLogList" parameterType="WxMsgLog" resultMap="WxMsgLogResult">
- <include refid="selectWxMsgLogVo"/>
- <where>
- <if test="accountId != null "> and account_id = #{accountId}</if>
- <if test="key != null and key != ''"> and key = #{key}</if>
- <if test="type != null "> and type = #{type}</if>
- <if test="msgId != null "> and msg_id = #{msgId}</if>
- <if test="fromUserName != null and fromUserName != ''"> and from_user_name like concat('%', #{fromUserName}, '%')</if>
- <if test="toUserName != null and toUserName != ''"> and to_user_name like concat('%', #{toUserName}, '%')</if>
- <if test="msgType != null "> and msg_type = #{msgType}</if>
- <if test="content != null and content != ''"> and content = #{content}</if>
- <if test="imgStatus != null and imgStatus != ''"> and img_status = #{imgStatus}</if>
- <if test="imgBuf != null and imgBuf != ''"> and img_buf = #{imgBuf}</if>
- <if test="pushContent != null and pushContent != ''"> and push_content = #{pushContent}</if>
- <if test="newMsgId != null "> and new_msg_id = #{newMsgId}</if>
- </where>
- </select>
-
- <select id="selectWxMsgLogById" parameterType="Long" resultMap="WxMsgLogResult">
- <include refid="selectWxMsgLogVo"/>
- where id = #{id}
- </select>
-
- <insert id="insertWxMsgLog" parameterType="WxMsgLog" useGeneratedKeys="true" keyProperty="id">
- insert into wx_msg_log
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="accountId != null">account_id,</if>
- <if test="key != null">key,</if>
- <if test="type != null">type,</if>
- <if test="msgId != null">msg_id,</if>
- <if test="fromUserName != null">from_user_name,</if>
- <if test="toUserName != null">to_user_name,</if>
- <if test="msgType != null">msg_type,</if>
- <if test="content != null">content,</if>
- <if test="imgStatus != null">img_status,</if>
- <if test="imgBuf != null">img_buf,</if>
- <if test="pushContent != null">push_content,</if>
- <if test="newMsgId != null">new_msg_id,</if>
- <if test="createTime != null">create_time,</if>
- <if test="createBy != null">create_by,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="updateBy != null">update_by,</if>
- <if test="remark != null">remark,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="accountId != null">#{accountId},</if>
- <if test="key != null">#{key},</if>
- <if test="type != null">#{type},</if>
- <if test="msgId != null">#{msgId},</if>
- <if test="fromUserName != null">#{fromUserName},</if>
- <if test="toUserName != null">#{toUserName},</if>
- <if test="msgType != null">#{msgType},</if>
- <if test="content != null">#{content},</if>
- <if test="imgStatus != null">#{imgStatus},</if>
- <if test="imgBuf != null">#{imgBuf},</if>
- <if test="pushContent != null">#{pushContent},</if>
- <if test="newMsgId != null">#{newMsgId},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="updateBy != null">#{updateBy},</if>
- <if test="remark != null">#{remark},</if>
- </trim>
- </insert>
- <update id="updateWxMsgLog" parameterType="WxMsgLog">
- update wx_msg_log
- <trim prefix="SET" suffixOverrides=",">
- <if test="accountId != null">account_id = #{accountId},</if>
- <if test="key != null">key = #{key},</if>
- <if test="type != null">type = #{type},</if>
- <if test="msgId != null">msg_id = #{msgId},</if>
- <if test="fromUserName != null">from_user_name = #{fromUserName},</if>
- <if test="toUserName != null">to_user_name = #{toUserName},</if>
- <if test="msgType != null">msg_type = #{msgType},</if>
- <if test="content != null">content = #{content},</if>
- <if test="imgStatus != null">img_status = #{imgStatus},</if>
- <if test="imgBuf != null">img_buf = #{imgBuf},</if>
- <if test="pushContent != null">push_content = #{pushContent},</if>
- <if test="newMsgId != null">new_msg_id = #{newMsgId},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="createBy != null">create_by = #{createBy},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="updateBy != null">update_by = #{updateBy},</if>
- <if test="remark != null">remark = #{remark},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteWxMsgLogById" parameterType="Long">
- delete from wx_msg_log where id = #{id}
- </delete>
- <delete id="deleteWxMsgLogByIds" parameterType="String">
- delete from wx_msg_log where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|