<?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>
|