liuxiaolong
2019-05-06 c15226e1b58f255dbebf1bdca8d4e53b9277249c
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
36
37
38
39
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
<?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.basic.analy.dao.BbFaceDao" >
  <resultMap id="BaseResultMap" type="com.basic.analy.model.BbFace" >
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="orgId" property="orgId" jdbcType="VARCHAR" />
    <result column="resourceId" property="resourceId" jdbcType="VARCHAR" />
    <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
    <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
    <result column="delFlag" property="delFlag" jdbcType="INTEGER" />
  </resultMap>
  <resultMap id="ResultMapWithBLOBs" type="com.basic.analy.model.BbFace" extends="BaseResultMap" >
    <result column="feature" property="feature" jdbcType="LONGVARBINARY" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, orgId, resourceId, delFlag
  </sql>
  <sql id="Blob_Column_List" >
    feature
  </sql>
  <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Integer" >
    select 
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from bb_face
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
    delete from bb_face
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.basic.analy.model.BbFace" >
    insert into bb_face (id, orgId, resourceId, 
      delFlag, feature,createTime,updateTime)
    values (#{id,jdbcType=INTEGER}, #{orgId,jdbcType=INTEGER}, #{resourceId,jdbcType=INTEGER}, 
      #{delFlag,jdbcType=INTEGER}, #{feature,jdbcType=LONGVARBINARY},#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.basic.analy.model.BbFace" keyProperty="id" keyColumn="id" useGeneratedKeys="true">
    insert into bb_face
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="orgId != null" >
        orgId,
      </if>
      <if test="resourceId != null" >
        resourceId,
      </if>
      <if test="delFlag != null" >
        delFlag,
      </if>
      <if test="feature != null" >
        feature,
      </if>
        <if test="createTime != null" >
            createTime,
        </if>
        <if test="updateTime != null" >
            updateTime,
        </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=INTEGER},
      </if>
      <if test="orgId != null" >
        #{orgId,jdbcType=INTEGER},
      </if>
      <if test="resourceId != null" >
        #{resourceId,jdbcType=VARCHAR},
      </if>
      <if test="delFlag != null" >
        #{delFlag,jdbcType=INTEGER},
      </if>
      <if test="feature != null" >
        #{feature,jdbcType=LONGVARBINARY},
      </if>
        <if test="createTime != null" >
            #{createTime,jdbcType=TIMESTAMP},
        </if>
        <if test="updateTime != null" >
            #{updateTime,jdbcType=TIMESTAMP},
        </if>
    </trim>
  </insert>
  <update id="updateByResourceIdSelective" parameterType="com.basic.analy.model.BbFace" >
    update bb_face
    <set >
      <if test="orgId != null" >
        orgId = #{orgId,jdbcType=INTEGER},
      </if>
      <if test="resourceId != null" >
        resourceId = #{resourceId,jdbcType=INTEGER},
      </if>
      <if test="delFlag != null" >
        delFlag = #{delFlag,jdbcType=INTEGER},
      </if>
      <if test="feature != null" >
        feature = #{feature,jdbcType=LONGVARBINARY},
      </if>
    </set>
    where resourceId = #{resourceId,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.basic.analy.model.BbFace" >
    update bb_face
    set orgId = #{orgId,jdbcType=INTEGER},
      resourceId = #{resourceId,jdbcType=INTEGER},
      delFlag = #{delFlag,jdbcType=INTEGER},
      feature = #{feature,jdbcType=LONGVARBINARY}
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.basic.analy.model.BbFace" >
    update bb_face
    set orgId = #{orgId,jdbcType=INTEGER},
      resourceId = #{resourceId,jdbcType=INTEGER},
      delFlag = #{delFlag,jdbcType=INTEGER}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>