123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244 |
- <?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.juxiao.xchat.module.xbd.mapper.messgae.MsgPushRecordMapper">
- <resultMap id="BaseResultMap" type="com.juxiao.xchat.module.xbd.domain.message.MsgPushRecord" >
- <id column="record_id" property="recordId" jdbcType="INTEGER" />
- <result column="from_accid" property="fromAccid" jdbcType="BIGINT" />
- <result column="to_obj_type" property="toObjType" jdbcType="TINYINT" />
- <result column="msg_type" property="msgType" jdbcType="TINYINT" />
- <result column="to_accids" property="toAccids" jdbcType="VARCHAR" />
- <result column="to_erban_nos" property="toErbanNos" jdbcType="VARCHAR" />
- <result column="title" property="title" jdbcType="VARCHAR" />
- <result column="web_url" property="webUrl" jdbcType="VARCHAR" />
- <result column="pic_url" property="picUrl" jdbcType="VARCHAR" />
- <result column="skip_type" property="skipType" jdbcType="TINYINT" />
- <result column="skip_uri" property="skipUri" jdbcType="VARCHAR" />
- <result column="msg_desc" property="msgDesc" jdbcType="VARCHAR" />
- <result column="admin_id" property="adminId" jdbcType="VARCHAR" />
- <result column="crate_time" property="crateTime" jdbcType="TIMESTAMP" />
- <result column="msg_id" property="msgId" jdbcType="VARCHAR" />
- <result column="status" property="status" jdbcType="TINYINT" />
- </resultMap>
- <resultMap id="MessageInfoDTOMap" type="com.juxiao.xchat.module.xbd.dto.MessageInfoDTO" >
- <id column="record_id" property="recordId" jdbcType="INTEGER" />
- <result column="from_accid" property="fromAccid" jdbcType="BIGINT" />
- <result column="to_obj_type" property="toObjType" jdbcType="TINYINT" />
- <result column="msg_type" property="msgType" jdbcType="TINYINT" />
- <result column="to_accids" property="toAccids" jdbcType="VARCHAR" />
- <result column="to_erban_nos" property="toErbanNos" jdbcType="VARCHAR" />
- <result column="title" property="title" jdbcType="VARCHAR" />
- <result column="web_url" property="webUrl" jdbcType="VARCHAR" />
- <result column="pic_url" property="picUrl" jdbcType="VARCHAR" />
- <result column="skip_type" property="skipType" jdbcType="TINYINT" />
- <result column="skip_uri" property="skipUri" jdbcType="VARCHAR" />
- <result column="msg_desc" property="msgDesc" jdbcType="VARCHAR" />
- <result column="admin_id" property="adminId" jdbcType="VARCHAR" />
- <result column="crate_time" property="crateTime" jdbcType="TIMESTAMP" />
- <result column="msg_id" property="msgId" jdbcType="VARCHAR" />
- <result column="status" property="status" jdbcType="TINYINT" />
- </resultMap>
- <sql id="Base_Column_List" >
- record_id, from_accid, to_obj_type, msg_type, to_accids, to_erban_nos, title, web_url,
- pic_url, skip_type, skip_uri, msg_desc, admin_id, crate_time,msg_id,status
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from msg_push_record
- where record_id = #{recordId,jdbcType=INTEGER}
- </select>
- <insert id="insert" parameterType="com.juxiao.xchat.module.xbd.domain.message.MsgPushRecord" >
- <selectKey resultType="java.lang.Integer" keyProperty="recordId" order="AFTER" >
- SELECT LAST_INSERT_ID()
- </selectKey>
- insert into msg_push_record (from_accid, to_obj_type, msg_type,
- to_accids, to_erban_nos, title,
- web_url, pic_url, skip_type,
- skip_uri, msg_desc, admin_id,
- crate_time,msg_id,status)
- values (#{fromAccid,jdbcType=BIGINT}, #{toObjType,jdbcType=TINYINT}, #{msgType,jdbcType=TINYINT},
- #{toAccids,jdbcType=VARCHAR}, #{toErbanNos,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
- #{webUrl,jdbcType=VARCHAR}, #{picUrl,jdbcType=VARCHAR}, #{skipType,jdbcType=TINYINT},
- #{skipUri,jdbcType=VARCHAR}, #{msgDesc,jdbcType=VARCHAR}, #{adminId,jdbcType=VARCHAR},
- #{crateTime,jdbcType=TIMESTAMP},#{msgId,jdbcType=VARCHAR},#{status,jdbcType=TINYINT})
- </insert>
- <insert id="insertSelective" parameterType="com.juxiao.xchat.module.xbd.domain.message.MsgPushRecord" >
- <selectKey resultType="java.lang.Integer" keyProperty="recordId" order="AFTER" >
- SELECT LAST_INSERT_ID()
- </selectKey>
- insert into msg_push_record
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="fromAccid != null" >
- from_accid,
- </if>
- <if test="toObjType != null" >
- to_obj_type,
- </if>
- <if test="msgType != null" >
- msg_type,
- </if>
- <if test="toAccids != null" >
- to_accids,
- </if>
- <if test="toErbanNos != null" >
- to_erban_nos,
- </if>
- <if test="title != null" >
- title,
- </if>
- <if test="webUrl != null" >
- web_url,
- </if>
- <if test="picUrl != null" >
- pic_url,
- </if>
- <if test="skipType != null" >
- skip_type,
- </if>
- <if test="skipUri != null" >
- skip_uri,
- </if>
- <if test="msgDesc != null" >
- msg_desc,
- </if>
- <if test="adminId != null" >
- admin_id,
- </if>
- <if test="crateTime != null" >
- crate_time,
- </if>
- <if test="status != null" >
- status,
- </if>
- <if test="msgId != null" >
- msg_id,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="fromAccid != null" >
- #{fromAccid,jdbcType=BIGINT},
- </if>
- <if test="toObjType != null" >
- #{toObjType,jdbcType=TINYINT},
- </if>
- <if test="msgType != null" >
- #{msgType,jdbcType=TINYINT},
- </if>
- <if test="toAccids != null" >
- #{toAccids,jdbcType=VARCHAR},
- </if>
- <if test="toErbanNos != null" >
- #{toErbanNos,jdbcType=VARCHAR},
- </if>
- <if test="title != null" >
- #{title,jdbcType=VARCHAR},
- </if>
- <if test="webUrl != null" >
- #{webUrl,jdbcType=VARCHAR},
- </if>
- <if test="picUrl != null" >
- #{picUrl,jdbcType=VARCHAR},
- </if>
- <if test="skipType != null" >
- #{skipType,jdbcType=TINYINT},
- </if>
- <if test="skipUri != null" >
- #{skipUri,jdbcType=VARCHAR},
- </if>
- <if test="msgDesc != null" >
- #{msgDesc,jdbcType=VARCHAR},
- </if>
- <if test="adminId != null" >
- #{adminId,jdbcType=VARCHAR},
- </if>
- <if test="crateTime != null" >
- #{crateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="status != null" >
- #{status,jdbcType=VARCHAR},
- </if>
- <if test="msgId != null" >
- #{msgId,jdbcType=TINYINT},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.juxiao.xchat.module.xbd.domain.message.MsgPushRecord" >
- update msg_push_record
- <set >
- <if test="fromAccid != null" >
- from_accid = #{fromAccid,jdbcType=BIGINT},
- </if>
- <if test="toObjType != null" >
- to_obj_type = #{toObjType,jdbcType=TINYINT},
- </if>
- <if test="msgType != null" >
- msg_type = #{msgType,jdbcType=TINYINT},
- </if>
- <if test="toAccids != null" >
- to_accids = #{toAccids,jdbcType=VARCHAR},
- </if>
- <if test="toErbanNos != null" >
- to_erban_nos = #{toErbanNos,jdbcType=VARCHAR},
- </if>
- <if test="title != null" >
- title = #{title,jdbcType=VARCHAR},
- </if>
- <if test="webUrl != null" >
- web_url = #{webUrl,jdbcType=VARCHAR},
- </if>
- <if test="picUrl != null" >
- pic_url = #{picUrl,jdbcType=VARCHAR},
- </if>
- <if test="skipType != null" >
- skip_type = #{skipType,jdbcType=TINYINT},
- </if>
- <if test="skipUri != null" >
- skip_uri = #{skipUri,jdbcType=VARCHAR},
- </if>
- <if test="msgDesc != null" >
- msg_desc = #{msgDesc,jdbcType=VARCHAR},
- </if>
- <if test="adminId != null" >
- admin_id = #{adminId,jdbcType=VARCHAR},
- </if>
- <if test="crateTime != null" >
- crate_time = #{crateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="msgId != null" >
- msg_id = #{msgId,jdbcType=VARCHAR},
- </if>
- <if test="status != null" >
- status = #{status,jdbcType=TINYINT},
- </if>
- </set>
- where record_id = #{recordId,jdbcType=INTEGER}
- </update>
- <select id="selectMessageInfoList" resultMap="MessageInfoDTOMap">
- select
- <include refid="Base_Column_List" />
- from msg_push_record
- where 1 = 1
- <if test="erBanNo != null">
- and to_erban_nos = #{erBanNo}
- </if>
- <if test="messageType != null">
- and msg_type = #{messageType}
- </if>
- order by crate_time desc
- </select>
- </mapper>
|