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
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
<?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.AppAlipayInfoMapper" >
  <resultMap id="BaseResultMap" type="com.ks.app.entity.AppAlipayInfo" >
    <id column="app_id" property="appId" jdbcType="BIGINT" />
    <result column="alipay_app_id" property="alipayAppId" jdbcType="VARCHAR" />
    <result column="alipay_private_key" property="alipayPrivateKey" jdbcType="VARCHAR" />
  </resultMap>
  <resultMap id="ResultMapWithBLOBs" type="com.ks.app.entity.AppAlipayInfoWithBLOBs" extends="BaseResultMap" >
    <result column="alipay_app_cert_public_key" property="alipayAppCertPublicKey" jdbcType="BINARY" />
    <result column="alipay_public_cert" property="alipayPublicCert" jdbcType="BINARY" />
    <result column="alipay_root_cert" property="alipayRootCert" jdbcType="BINARY" />
  </resultMap>
  <sql id="Base_Column_List" >
    app_id, alipay_app_id, alipay_private_key
  </sql>
  <sql id="Blob_Column_List" >
    alipay_app_cert_public_key, alipay_public_cert, alipay_root_cert
  </sql>
  <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Long" >
    select 
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from app_alipay_info
    where app_id = #{appId,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    delete from app_alipay_info
    where app_id = #{appId,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.ks.app.entity.AppAlipayInfoWithBLOBs" >
    insert into app_alipay_info (app_id, alipay_app_id, alipay_private_key, 
      alipay_app_cert_public_key, alipay_public_cert, 
      alipay_root_cert)
    values (#{appId,jdbcType=BIGINT}, #{alipayAppId,jdbcType=VARCHAR}, #{alipayPrivateKey,jdbcType=VARCHAR}, 
      #{alipayAppCertPublicKey,jdbcType=BINARY}, #{alipayPublicCert,jdbcType=BINARY}, 
      #{alipayRootCert,jdbcType=BINARY})
  </insert>
  <insert id="insertSelective" parameterType="com.ks.app.entity.AppAlipayInfoWithBLOBs" >
    insert into app_alipay_info
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="appId != null" >
        app_id,
      </if>
      <if test="alipayAppId != null" >
        alipay_app_id,
      </if>
      <if test="alipayPrivateKey != null" >
        alipay_private_key,
      </if>
      <if test="alipayAppCertPublicKey != null" >
        alipay_app_cert_public_key,
      </if>
      <if test="alipayPublicCert != null" >
        alipay_public_cert,
      </if>
      <if test="alipayRootCert != null" >
        alipay_root_cert,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="appId != null" >
        #{appId,jdbcType=BIGINT},
      </if>
      <if test="alipayAppId != null" >
        #{alipayAppId,jdbcType=VARCHAR},
      </if>
      <if test="alipayPrivateKey != null" >
        #{alipayPrivateKey,jdbcType=VARCHAR},
      </if>
      <if test="alipayAppCertPublicKey != null" >
        #{alipayAppCertPublicKey,jdbcType=BINARY},
      </if>
      <if test="alipayPublicCert != null" >
        #{alipayPublicCert,jdbcType=BINARY},
      </if>
      <if test="alipayRootCert != null" >
        #{alipayRootCert,jdbcType=BINARY},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.ks.app.entity.AppAlipayInfoWithBLOBs" >
    update app_alipay_info
    <set >
      <if test="alipayAppId != null" >
        alipay_app_id = #{alipayAppId,jdbcType=VARCHAR},
      </if>
      <if test="alipayPrivateKey != null" >
        alipay_private_key = #{alipayPrivateKey,jdbcType=VARCHAR},
      </if>
      <if test="alipayAppCertPublicKey != null" >
        alipay_app_cert_public_key = #{alipayAppCertPublicKey,jdbcType=BINARY},
      </if>
      <if test="alipayPublicCert != null" >
        alipay_public_cert = #{alipayPublicCert,jdbcType=BINARY},
      </if>
      <if test="alipayRootCert != null" >
        alipay_root_cert = #{alipayRootCert,jdbcType=BINARY},
      </if>
    </set>
    where app_id = #{appId,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.ks.app.entity.AppAlipayInfoWithBLOBs" >
    update app_alipay_info
    set alipay_app_id = #{alipayAppId,jdbcType=VARCHAR},
      alipay_private_key = #{alipayPrivateKey,jdbcType=VARCHAR},
      alipay_app_cert_public_key = #{alipayAppCertPublicKey,jdbcType=BINARY},
      alipay_public_cert = #{alipayPublicCert,jdbcType=BINARY},
      alipay_root_cert = #{alipayRootCert,jdbcType=BINARY}
    where app_id = #{appId,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.ks.app.entity.AppAlipayInfo" >
    update app_alipay_info
    set alipay_app_id = #{alipayAppId,jdbcType=VARCHAR},
      alipay_private_key = #{alipayPrivateKey,jdbcType=VARCHAR}
    where app_id = #{appId,jdbcType=BIGINT}
  </update>
</mapper>