123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- <?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.record.GiftCarGetRecordMapper">
- <resultMap id="BaseResultMap" type="com.juxiao.xchat.module.xbd.domain.record.GiftCarGetRecord" >
- <id column="record_id" property="recordId" jdbcType="BIGINT" />
- <result column="uid" property="uid" jdbcType="BIGINT" />
- <result column="car_id" property="carId" jdbcType="BIGINT" />
- <result column="car_date" property="carDate" jdbcType="INTEGER" />
- <result column="type" property="type" jdbcType="TINYINT" />
- <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
- </resultMap>
- <sql id="Base_Column_List" >
- record_id, uid, car_id, car_date, type, create_time
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
- select
- <include refid="Base_Column_List" />
- from gift_car_get_record
- where record_id = #{recordId,jdbcType=BIGINT}
- </select>
- <insert id="insert" parameterType="com.juxiao.xchat.module.xbd.domain.record.GiftCarGetRecord" >
- <selectKey resultType="java.lang.Long" keyProperty="recordId" order="AFTER" >
- SELECT LAST_INSERT_ID()
- </selectKey>
- insert into gift_car_get_record (uid, car_id, car_date,
- type, create_time)
- values (#{uid,jdbcType=BIGINT}, #{carId,jdbcType=BIGINT}, #{carDate,jdbcType=INTEGER},
- #{type,jdbcType=TINYINT}, #{createTime,jdbcType=TIMESTAMP})
- </insert>
- <insert id="insertSelective" parameterType="com.juxiao.xchat.module.xbd.domain.record.GiftCarGetRecord" >
- <selectKey resultType="java.lang.Long" keyProperty="recordId" order="AFTER" >
- SELECT LAST_INSERT_ID()
- </selectKey>
- insert into gift_car_get_record
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="uid != null" >
- uid,
- </if>
- <if test="carId != null" >
- car_id,
- </if>
- <if test="carDate != null" >
- car_date,
- </if>
- <if test="type != null" >
- type,
- </if>
- <if test="createTime != null" >
- create_time,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="uid != null" >
- #{uid,jdbcType=BIGINT},
- </if>
- <if test="carId != null" >
- #{carId,jdbcType=BIGINT},
- </if>
- <if test="carDate != null" >
- #{carDate,jdbcType=INTEGER},
- </if>
- <if test="type != null" >
- #{type,jdbcType=TINYINT},
- </if>
- <if test="createTime != null" >
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.juxiao.xchat.module.xbd.domain.record.GiftCarGetRecord" >
- update gift_car_get_record
- <set >
- <if test="uid != null" >
- uid = #{uid,jdbcType=BIGINT},
- </if>
- <if test="carId != null" >
- car_id = #{carId,jdbcType=BIGINT},
- </if>
- <if test="carDate != null" >
- car_date = #{carDate,jdbcType=INTEGER},
- </if>
- <if test="type != null" >
- type = #{type,jdbcType=TINYINT},
- </if>
- <if test="createTime != null" >
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- </set>
- where record_id = #{recordId,jdbcType=BIGINT}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.juxiao.xchat.module.xbd.domain.record.GiftCarGetRecord" >
- update gift_car_get_record
- set uid = #{uid,jdbcType=BIGINT},
- car_id = #{carId,jdbcType=BIGINT},
- car_date = #{carDate,jdbcType=INTEGER},
- type = #{type,jdbcType=TINYINT},
- create_time = #{createTime,jdbcType=TIMESTAMP}
- where record_id = #{recordId,jdbcType=BIGINT}
- </update>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
- delete from gift_car_get_record
- where record_id = #{recordId,jdbcType=BIGINT}
- </delete>
- </mapper>
|