123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- <?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.circle.MomentMsgRecordMapper">
- <resultMap id="BaseResultMap" type="com.juxiao.xchat.module.xbd.domain.circle.MomentMsgRecord" >
- <id column="id" property="id" jdbcType="BIGINT" />
- <result column="uid" property="uid" jdbcType="BIGINT" />
- <result column="moment_id" property="momentId" jdbcType="BIGINT" />
- <result column="player_id" property="playerId" jdbcType="BIGINT" />
- <result column="moment_uid" property="momentUid" jdbcType="BIGINT" />
- <result column="from_uid" property="fromUid" jdbcType="BIGINT" />
- <result column="type" property="type" jdbcType="BIT" />
- <result column="read_status" property="readStatus" jdbcType="BIT" />
- <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
- <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
- <result column="context" property="context" jdbcType="VARCHAR" />
- </resultMap>
- <sql id="Base_Column_List" >
- id, uid, moment_id, player_id, moment_uid, from_uid, type, read_status, create_date,
- update_date, context
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
- select
- <include refid="Base_Column_List" />
- from moment_msg_record
- where id = #{id,jdbcType=BIGINT}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
- delete from moment_msg_record
- where id = #{id,jdbcType=BIGINT}
- </delete>
- <insert id="insert" parameterType="com.juxiao.xchat.module.xbd.domain.circle.MomentMsgRecord" >
- <selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER" >
- SELECT LAST_INSERT_ID()
- </selectKey>
- insert into moment_msg_record (uid, moment_id, player_id,
- moment_uid, from_uid, type,
- read_status, create_date, update_date,
- context)
- values (#{uid,jdbcType=BIGINT}, #{momentId,jdbcType=BIGINT}, #{playerId,jdbcType=BIGINT},
- #{momentUid,jdbcType=BIGINT}, #{fromUid,jdbcType=BIGINT}, #{type,jdbcType=BIT},
- #{readStatus,jdbcType=BIT}, #{createDate,jdbcType=TIMESTAMP}, #{updateDate,jdbcType=TIMESTAMP},
- #{context,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.juxiao.xchat.module.xbd.domain.circle.MomentMsgRecord" >
- <selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER" >
- SELECT LAST_INSERT_ID()
- </selectKey>
- insert into moment_msg_record
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="uid != null" >
- uid,
- </if>
- <if test="momentId != null" >
- moment_id,
- </if>
- <if test="playerId != null" >
- player_id,
- </if>
- <if test="momentUid != null" >
- moment_uid,
- </if>
- <if test="fromUid != null" >
- from_uid,
- </if>
- <if test="type != null" >
- type,
- </if>
- <if test="readStatus != null" >
- read_status,
- </if>
- <if test="createDate != null" >
- create_date,
- </if>
- <if test="updateDate != null" >
- update_date,
- </if>
- <if test="context != null" >
- context,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="uid != null" >
- #{uid,jdbcType=BIGINT},
- </if>
- <if test="momentId != null" >
- #{momentId,jdbcType=BIGINT},
- </if>
- <if test="playerId != null" >
- #{playerId,jdbcType=BIGINT},
- </if>
- <if test="momentUid != null" >
- #{momentUid,jdbcType=BIGINT},
- </if>
- <if test="fromUid != null" >
- #{fromUid,jdbcType=BIGINT},
- </if>
- <if test="type != null" >
- #{type,jdbcType=BIT},
- </if>
- <if test="readStatus != null" >
- #{readStatus,jdbcType=BIT},
- </if>
- <if test="createDate != null" >
- #{createDate,jdbcType=TIMESTAMP},
- </if>
- <if test="updateDate != null" >
- #{updateDate,jdbcType=TIMESTAMP},
- </if>
- <if test="context != null" >
- #{context,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.juxiao.xchat.module.xbd.domain.circle.MomentMsgRecord" >
- update moment_msg_record
- <set >
- <if test="uid != null" >
- uid = #{uid,jdbcType=BIGINT},
- </if>
- <if test="momentId != null" >
- moment_id = #{momentId,jdbcType=BIGINT},
- </if>
- <if test="playerId != null" >
- player_id = #{playerId,jdbcType=BIGINT},
- </if>
- <if test="momentUid != null" >
- moment_uid = #{momentUid,jdbcType=BIGINT},
- </if>
- <if test="fromUid != null" >
- from_uid = #{fromUid,jdbcType=BIGINT},
- </if>
- <if test="type != null" >
- type = #{type,jdbcType=BIT},
- </if>
- <if test="readStatus != null" >
- read_status = #{readStatus,jdbcType=BIT},
- </if>
- <if test="createDate != null" >
- create_date = #{createDate,jdbcType=TIMESTAMP},
- </if>
- <if test="updateDate != null" >
- update_date = #{updateDate,jdbcType=TIMESTAMP},
- </if>
- <if test="context != null" >
- context = #{context,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=BIGINT}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.juxiao.xchat.module.xbd.domain.circle.MomentMsgRecord" >
- update moment_msg_record
- set uid = #{uid,jdbcType=BIGINT},
- moment_id = #{momentId,jdbcType=BIGINT},
- player_id = #{playerId,jdbcType=BIGINT},
- moment_uid = #{momentUid,jdbcType=BIGINT},
- from_uid = #{fromUid,jdbcType=BIGINT},
- type = #{type,jdbcType=BIT},
- read_status = #{readStatus,jdbcType=BIT},
- create_date = #{createDate,jdbcType=TIMESTAMP},
- update_date = #{updateDate,jdbcType=TIMESTAMP},
- context = #{context,jdbcType=VARCHAR}
- where id = #{id,jdbcType=BIGINT}
- </update>
- </mapper>
|