admin
2020-12-17 d8d576c5220e9d24251b51a59a58271c6e0cb4a4
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
<?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.ks.app.mapper.AppWXInfoMapper" >
  <resultMap id="BaseResultMap" type="com.ks.app.entity.AppWXInfo" >
    <id column="app_id" property="appId" jdbcType="BIGINT" />
    <result column="wx_app_id" property="wxAppId" jdbcType="VARCHAR" />
    <result column="wx_app_secret" property="wxAppSecret" jdbcType="VARCHAR" />
    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
    <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
  </resultMap>
  <sql id="Base_Column_List" >
    app_id, wx_app_id, wx_app_secret, create_time, update_time
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
    select 
    <include refid="Base_Column_List" />
    from app_wx_info
    where app_id = #{appId,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    delete from app_wx_info
    where app_id = #{appId,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.ks.app.entity.AppWXInfo" >
    insert into app_wx_info (app_id, wx_app_id, wx_app_secret, 
      create_time, update_time)
    values (#{appId,jdbcType=BIGINT}, #{wxAppId,jdbcType=VARCHAR}, #{wxAppSecret,jdbcType=VARCHAR}, 
      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.ks.app.entity.AppWXInfo" >
    insert into app_wx_info
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="appId != null" >
        app_id,
      </if>
      <if test="wxAppId != null" >
        wx_app_id,
      </if>
      <if test="wxAppSecret != null" >
        wx_app_secret,
      </if>
      <if test="createTime != null" >
        create_time,
      </if>
      <if test="updateTime != null" >
        update_time,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="appId != null" >
        #{appId,jdbcType=BIGINT},
      </if>
      <if test="wxAppId != null" >
        #{wxAppId,jdbcType=VARCHAR},
      </if>
      <if test="wxAppSecret != null" >
        #{wxAppSecret,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null" >
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null" >
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.ks.app.entity.AppWXInfo" >
    update app_wx_info
    <set >
      <if test="wxAppId != null" >
        wx_app_id = #{wxAppId,jdbcType=VARCHAR},
      </if>
      <if test="wxAppSecret != null" >
        wx_app_secret = #{wxAppSecret,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null" >
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null" >
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where app_id = #{appId,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.ks.app.entity.AppWXInfo" >
    update app_wx_info
    set wx_app_id = #{wxAppId,jdbcType=VARCHAR},
      wx_app_secret = #{wxAppSecret,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_time = #{updateTime,jdbcType=TIMESTAMP}
    where app_id = #{appId,jdbcType=BIGINT}
  </update>
</mapper>