Blame view

dal/src/main/resources/META-INF/mybatis/order/SellerEnterApplyMapper.xml 5.01 KB
chenchao authored
1 2 3 4 5 6 7 8 9 10 11 12 13 14
<?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.yohoufo.dal.order.SellerEnterApplyMapper">
  <resultMap id="BaseResultMap" type="com.yohoufo.dal.order.model.SellerEnterApply">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="uid" jdbcType="INTEGER" property="uid" />
    <result column="order_code" jdbcType="BIGINT" property="orderCode" />
    <result column="pre_enter_type" jdbcType="INTEGER" property="preEnterType" />
    <result column="enter_type" jdbcType="INTEGER" property="enterType" />
    <result column="create_time" jdbcType="INTEGER" property="createTime" />
    <result column="update_time" jdbcType="INTEGER" property="updateTime" />
    <result column="status" jdbcType="SMALLINT" property="status" />
  </resultMap>
  <sql id="Base_Column_List">
15
    id, uid, order_code, pre_enter_type, enter_type, create_time, update_time, `status`
chenchao authored
16 17 18 19 20 21 22
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from seller_enter_apply
    where id = #{id,jdbcType=INTEGER}
  </select>
chenchao authored
23
24
  <select id="selectByUOCET" parameterType="com.yohoufo.dal.order.model.SellerEnterApply" resultMap="BaseResultMap">
chenchao authored
25 26 27 28
    select
    <include refid="Base_Column_List" />
    from seller_enter_apply
    where uid = #{uid,jdbcType=INTEGER}
29 30 31 32 33 34
    <if test="orderCode != null">
      and order_code = #{orderCode,jdbcType=BIGINT}
    </if>
    <if test="enterType != null">
      and enter_type = #{enterType,jdbcType=INTEGER}
    </if>
chenchao authored
35
    <if test="preEnterType != null">
chenchao authored
36
      and pre_enter_type = #{preEnterType,jdbcType=INTEGER}
chenchao authored
37
    </if>
chenchao authored
38
  </select>
mali authored
39
chenchao authored
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yohoufo.dal.order.model.SellerEnterApply" useGeneratedKeys="true">
    insert into seller_enter_apply (uid, order_code, pre_enter_type, 
      enter_type, create_time, update_time, 
      status)
    values (#{uid,jdbcType=INTEGER}, #{orderCode,jdbcType=BIGINT}, #{preEnterType,jdbcType=INTEGER}, 
      #{enterType,jdbcType=INTEGER}, #{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}, 
      #{status,jdbcType=SMALLINT})
  </insert>
  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yohoufo.dal.order.model.SellerEnterApply" useGeneratedKeys="true">
    insert into seller_enter_apply
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="uid != null">
        uid,
      </if>
      <if test="orderCode != null">
        order_code,
      </if>
      <if test="preEnterType != null">
        pre_enter_type,
      </if>
      <if test="enterType != null">
        enter_type,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="updateTime != null">
        update_time,
      </if>
      <if test="status != null">
        status,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="uid != null">
        #{uid,jdbcType=INTEGER},
      </if>
      <if test="orderCode != null">
        #{orderCode,jdbcType=BIGINT},
      </if>
      <if test="preEnterType != null">
        #{preEnterType,jdbcType=INTEGER},
      </if>
      <if test="enterType != null">
        #{enterType,jdbcType=INTEGER},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=INTEGER},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=INTEGER},
      </if>
      <if test="status != null">
        #{status,jdbcType=SMALLINT},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.yohoufo.dal.order.model.SellerEnterApply">
    update seller_enter_apply
    <set>
      <if test="uid != null">
        uid = #{uid,jdbcType=INTEGER},
      </if>
      <if test="orderCode != null">
        order_code = #{orderCode,jdbcType=BIGINT},
      </if>
      <if test="preEnterType != null">
        pre_enter_type = #{preEnterType,jdbcType=INTEGER},
      </if>
      <if test="enterType != null">
        enter_type = #{enterType,jdbcType=INTEGER},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=INTEGER},
      </if>
      <if test="updateTime != null">
        update_time = #{updateTime,jdbcType=INTEGER},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=SMALLINT},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.yohoufo.dal.order.model.SellerEnterApply">
    update seller_enter_apply
    set uid = #{uid,jdbcType=INTEGER},
      order_code = #{orderCode,jdbcType=BIGINT},
      pre_enter_type = #{preEnterType,jdbcType=INTEGER},
      enter_type = #{enterType,jdbcType=INTEGER},
      create_time = #{createTime,jdbcType=INTEGER},
      update_time = #{updateTime,jdbcType=INTEGER},
      status = #{status,jdbcType=SMALLINT}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>