admin
2020-05-20 98b1a0affd69bbe63223c21fdd2c404e8bedfccb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?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.yeshi.fanli.dao.mybatis.redpack.RedPackForbidMapper">
  <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.redpack.RedPackForbid">
    <id column="rpf_uid" property="id" jdbcType="BIGINT"/>
    <result column="rpf_end_time" property="endTime" jdbcType="TIMESTAMP"/>
    <result column="rpf_create_time" property="createTime" jdbcType="TIMESTAMP"/>
  </resultMap>
  <sql id="Base_Column_List">rpf_uid,rpf_end_time,rpf_create_time</sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
    <include refid="Base_Column_List"/>from yeshi_ec_red_pack_forbid where rpf_uid = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_red_pack_forbid where rpf_uid = #{id,jdbcType=BIGINT}</delete>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.redpack.RedPackForbid" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_red_pack_forbid (rpf_uid,rpf_end_time,rpf_create_time) values (#{id,jdbcType=BIGINT},#{endTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP})</insert>
  <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.redpack.RedPackForbid" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_red_pack_forbid
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">rpf_uid,</if>
      <if test="endTime != null">rpf_end_time,</if>
      <if test="createTime != null">rpf_create_time,</if>
    </trim>values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">#{id,jdbcType=BIGINT},</if>
      <if test="endTime != null">#{endTime,jdbcType=TIMESTAMP},</if>
      <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.redpack.RedPackForbid">update yeshi_ec_red_pack_forbid set rpf_end_time = #{endTime,jdbcType=TIMESTAMP},rpf_create_time = #{createTime,jdbcType=TIMESTAMP} where rpf_uid = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.redpack.RedPackForbid">update yeshi_ec_red_pack_forbid
    <set>
      <if test="endTime != null">rpf_end_time=#{endTime,jdbcType=TIMESTAMP},</if>
      <if test="createTime != null">rpf_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
    </set> where rpf_uid = #{id,jdbcType=BIGINT}
  </update>
</mapper>