|
|
@ -4,254 +4,83 @@ |
|
|
<resultMap id="BaseResultMap" type="com.base.springcloud.entity.MerchantConfig"> |
|
|
<resultMap id="BaseResultMap" type="com.base.springcloud.entity.MerchantConfig"> |
|
|
<id column="id" jdbcType="VARCHAR" property="id"/> |
|
|
<id column="id" jdbcType="VARCHAR" property="id"/> |
|
|
<result column="app_id" jdbcType="VARCHAR" property="appId"/> |
|
|
<result column="app_id" jdbcType="VARCHAR" property="appId"/> |
|
|
<result column="api_key" jdbcType="VARCHAR" property="appKey"/> |
|
|
<result column="api_key" jdbcType="VARCHAR" property="apiKey"/> |
|
|
<result column="cert_path" jdbcType="VARCHAR" property="certPath"/> |
|
|
<result column="cert_path" jdbcType="VARCHAR" property="certPath"/> |
|
|
<result column="merchant_id" jdbcType="VARCHAR" property="merchantId"/> |
|
|
<result column="serial_no" jdbcType="VARCHAR" property="serialNo"/> |
|
|
<result column="merchant_name" jdbcType="VARCHAR" property="merchantName"/> |
|
|
<result column="mch_id" jdbcType="VARCHAR" property="mchId"/> |
|
|
<result column="city_store_name" jdbcType="VARCHAR" property="cityStoreName"/> |
|
|
<result column="mch_private_key" jdbcType="VARCHAR" property="mchPrivateKey"/> |
|
|
<result column="store_brand_name" jdbcType="VARCHAR" property="storeBrandName"/> |
|
|
<result column="create_id" jdbcType="VARCHAR" property="createId"/> |
|
|
<result column="sign_type" jdbcType="VARCHAR" property="signType"/> |
|
|
<result column="create_depart_id" jdbcType="VARCHAR" property="createDepartId"/> |
|
|
<result column="private_key" jdbcType="VARCHAR" property="privateKey"/> |
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> |
|
|
<result column="device_info" jdbcType="VARCHAR" property="deviceInfo"/> |
|
|
<result column="update_id" jdbcType="VARCHAR" property="updateId"/> |
|
|
<result column="spbill_create_ip" jdbcType="VARCHAR" property="spbillCreateIp"/> |
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> |
|
|
<result column="notify_url" jdbcType="VARCHAR" property="notifyUrl"/> |
|
|
|
|
|
<result column="time_stamp" jdbcType="TIMESTAMP" property="timeStamp"/> |
|
|
<result column="time_stamp" jdbcType="TIMESTAMP" property="timeStamp"/> |
|
|
</resultMap> |
|
|
</resultMap> |
|
|
|
|
|
|
|
|
<sql id="Base_Column_List"> |
|
|
<sql id="Base_Column_List"> |
|
|
id, app_id, api_key, cert_path, merchant_id, merchant_name, city_store_name, store_brand_name, |
|
|
id,app_id,api_key,cert_path,serial_no,mch_id,mch_private_key, |
|
|
sign_type, private_key, device_info, spbill_create_ip, notify_url, time_stamp |
|
|
create_id,create_depart_id,create_time,update_id,update_time,time_stamp |
|
|
</sql> |
|
|
</sql> |
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> |
|
|
|
|
|
select |
|
|
|
|
|
<include refid="Base_Column_List"/> |
|
|
|
|
|
from pay_merchant_config |
|
|
|
|
|
where id = #{id,jdbcType=VARCHAR} |
|
|
|
|
|
</select> |
|
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> |
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> |
|
|
delete from pay_merchant_config |
|
|
delete from pay_merchant_config |
|
|
where id = #{id,jdbcType=VARCHAR} |
|
|
where id = #{id,jdbcType=VARCHAR} |
|
|
</delete> |
|
|
</delete> |
|
|
<insert id="insert" parameterType="com.base.springcloud.entity.MerchantConfig"> |
|
|
<insert id="insert" parameterType="com.base.springcloud.entity.MerchantConfig"> |
|
|
insert into pay_merchant_config (id, app_id, api_key, |
|
|
insert into pay_merchant_config (id, app_id, api_key, |
|
|
cert_path, merchant_id, merchant_name, |
|
|
cert_path, serial_no,mch_id,mch_private_key, create_id, create_depart_id, |
|
|
city_store_name, store_brand_name, sign_type, |
|
|
create_time, time_stamp) |
|
|
private_key, device_info, spbill_create_ip, |
|
|
values (#{id,jdbcType=VARCHAR}, #{appId,jdbcType=VARCHAR}, #{apiKey,jdbcType=VARCHAR}, |
|
|
notify_url, time_stamp) |
|
|
#{certPath,jdbcType=VARCHAR}, #{serialNo,jdbcType=VARCHAR},#{mchId,jdbcType=VARCHAR}, #{mchPrivateKey,jdbcType=VARCHAR}, |
|
|
values (#{id,jdbcType=VARCHAR}, #{appId,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, |
|
|
#{createId,jdbcType=VARCHAR}, #{createDepartId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, |
|
|
#{certPath,jdbcType=VARCHAR}, #{merchantId,jdbcType=VARCHAR}, #{merchantName,jdbcType=VARCHAR}, |
|
|
#{timeStamp,jdbcType=TIMESTAMP}) |
|
|
#{cityStoreName,jdbcType=VARCHAR}, #{storeBrandName,jdbcType=VARCHAR}, #{signType,jdbcType=VARCHAR}, |
|
|
|
|
|
#{privateKey,jdbcType=VARCHAR}, #{deviceInfo,jdbcType=VARCHAR}, #{spbillCreateIp,jdbcType=VARCHAR}, |
|
|
|
|
|
#{notifyUrl,jdbcType=VARCHAR}, #{timeStamp,jdbcType=TIMESTAMP}) |
|
|
|
|
|
</insert> |
|
|
</insert> |
|
|
<insert id="insertSelective" parameterType="com.base.springcloud.entity.MerchantConfig"> |
|
|
<delete id="removeMerchantConfig" parameterType="java.lang.String"> |
|
|
insert into pay_merchant_config |
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
|
|
|
|
<if test="id != null"> |
|
|
|
|
|
id, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="appId != null"> |
|
|
|
|
|
app_id, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="appKey != null"> |
|
|
|
|
|
api_key, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="certPath != null"> |
|
|
|
|
|
cert_path, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="serialNo != null"> |
|
|
|
|
|
serial_no |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="merchantId != null"> |
|
|
|
|
|
merchant_id, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="merchantName != null"> |
|
|
|
|
|
merchant_name, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="cityStoreName != null"> |
|
|
|
|
|
city_store_name, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="storeBrandName != null"> |
|
|
|
|
|
store_brand_name, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="signType != null"> |
|
|
|
|
|
sign_type, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="privateKey != null"> |
|
|
|
|
|
private_key, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="deviceInfo != null"> |
|
|
|
|
|
device_info, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="spbillCreateIp != null"> |
|
|
|
|
|
spbill_create_ip, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="notifyUrl != null"> |
|
|
|
|
|
notify_url, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="timeStamp != null"> |
|
|
|
|
|
time_stamp, |
|
|
|
|
|
</if> |
|
|
|
|
|
</trim> |
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
|
|
|
|
<if test="id != null"> |
|
|
|
|
|
#{id,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="appId != null"> |
|
|
|
|
|
#{appId,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="appKey != null"> |
|
|
|
|
|
#{appKey,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="certPath != null"> |
|
|
|
|
|
#{certPath,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="serialNo != null"> |
|
|
|
|
|
#{serialNo,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="merchantId != null"> |
|
|
|
|
|
#{merchantId,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="merchantName != null"> |
|
|
|
|
|
#{merchantName,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="cityStoreName != null"> |
|
|
|
|
|
#{cityStoreName,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="storeBrandName != null"> |
|
|
|
|
|
#{storeBrandName,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="signType != null"> |
|
|
|
|
|
#{signType,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="privateKey != null"> |
|
|
|
|
|
#{privateKey,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="deviceInfo != null"> |
|
|
|
|
|
#{deviceInfo,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="spbillCreateIp != null"> |
|
|
|
|
|
#{spbillCreateIp,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="notifyUrl != null"> |
|
|
|
|
|
#{notifyUrl,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="timeStamp != null"> |
|
|
|
|
|
#{timeStamp,jdbcType=TIMESTAMP}, |
|
|
|
|
|
</if> |
|
|
|
|
|
</trim> |
|
|
|
|
|
</insert> |
|
|
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.base.springcloud.entity.MerchantConfig"> |
|
|
|
|
|
update pay_merchant_config |
|
|
|
|
|
<set> |
|
|
|
|
|
<if test="appId != null"> |
|
|
|
|
|
app_id = #{appId,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="appKey != null"> |
|
|
|
|
|
api_key = #{appKey,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="certPath != null"> |
|
|
|
|
|
cert_path = #{certPath,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="merchantId != null"> |
|
|
|
|
|
merchant_id = #{merchantId,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="merchantName != null"> |
|
|
|
|
|
merchant_name = #{merchantName,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="cityStoreName != null"> |
|
|
|
|
|
city_store_name = #{cityStoreName,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="storeBrandName != null"> |
|
|
|
|
|
store_brand_name = #{storeBrandName,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="signType != null"> |
|
|
|
|
|
sign_type = #{signType,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="privateKey != null"> |
|
|
|
|
|
private_key = #{privateKey,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="deviceInfo != null"> |
|
|
|
|
|
device_info = #{deviceInfo,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="spbillCreateIp != null"> |
|
|
|
|
|
spbill_create_ip = #{spbillCreateIp,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="notifyUrl != null"> |
|
|
|
|
|
notify_url = #{notifyUrl,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="timeStamp != null"> |
|
|
|
|
|
time_stamp = #{timeStamp,jdbcType=TIMESTAMP}, |
|
|
|
|
|
</if> |
|
|
|
|
|
</set> |
|
|
|
|
|
where id = #{id,jdbcType=VARCHAR} |
|
|
|
|
|
</update> |
|
|
|
|
|
<update id="updateByPrimaryKey" parameterType="com.base.springcloud.entity.MerchantConfig"> |
|
|
|
|
|
update pay_merchant_config |
|
|
|
|
|
set app_id = #{appId,jdbcType=VARCHAR}, |
|
|
|
|
|
api_key = #{appKey,jdbcType=VARCHAR}, |
|
|
|
|
|
cert_path = #{certPath,jdbcType=VARCHAR}, |
|
|
|
|
|
merchant_id = #{merchantId,jdbcType=VARCHAR}, |
|
|
|
|
|
merchant_name = #{merchantName,jdbcType=VARCHAR}, |
|
|
|
|
|
city_store_name = #{cityStoreName,jdbcType=VARCHAR}, |
|
|
|
|
|
store_brand_name = #{storeBrandName,jdbcType=VARCHAR}, |
|
|
|
|
|
sign_type = #{signType,jdbcType=VARCHAR}, |
|
|
|
|
|
private_key = #{privateKey,jdbcType=VARCHAR}, |
|
|
|
|
|
device_info = #{deviceInfo,jdbcType=VARCHAR}, |
|
|
|
|
|
spbill_create_ip = #{spbillCreateIp,jdbcType=VARCHAR}, |
|
|
|
|
|
notify_url = #{notifyUrl,jdbcType=VARCHAR}, |
|
|
|
|
|
time_stamp = #{timeStamp,jdbcType=TIMESTAMP} |
|
|
|
|
|
where id = #{id,jdbcType=VARCHAR} |
|
|
|
|
|
</update> |
|
|
|
|
|
|
|
|
|
|
|
<delete id="removeMerchantConfig" parameterType="java.lang.String"> |
|
|
|
|
|
delete from pay_merchant_config |
|
|
delete from pay_merchant_config |
|
|
where merchant_id = #{merchantId,jdbcType=VARCHAR} |
|
|
where mch_id = #{mchId,jdbcType=VARCHAR} |
|
|
</delete> |
|
|
</delete> |
|
|
|
|
|
<select id="queryMerchantConfig" parameterType="com.base.springcloud.entity.MerchantConfig" |
|
|
<select id="queryMerchantConfig" parameterType="com.base.springcloud.entity.MerchantConfig" resultMap="BaseResultMap"> |
|
|
resultMap="BaseResultMap"> |
|
|
select |
|
|
select |
|
|
<include refid="Base_Column_List"/> |
|
|
<include refid="Base_Column_List"/> |
|
|
from pay_merchant_config |
|
|
from pay_merchant_config |
|
|
<where> |
|
|
<where> |
|
|
|
|
|
<if test="mchId != null"> |
|
|
|
|
|
mch_id = #{mchId,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
</where> |
|
|
|
|
|
</select> |
|
|
|
|
|
<update id="updateMerchantConfig" parameterType="com.base.springcloud.entity.MerchantConfig"> |
|
|
|
|
|
update pay_merchant_config |
|
|
|
|
|
|
|
|
|
|
|
<set> |
|
|
<if test="appId != null"> |
|
|
<if test="appId != null"> |
|
|
app_id = #{appId,jdbcType=VARCHAR}, |
|
|
app_id = #{appId,jdbcType=VARCHAR}, |
|
|
</if> |
|
|
</if> |
|
|
<if test="appKey != null"> |
|
|
<if test="apiKey != null"> |
|
|
api_key = #{appKey,jdbcType=VARCHAR}, |
|
|
api_key = #{apiKey,jdbcType=VARCHAR}, |
|
|
</if> |
|
|
</if> |
|
|
<if test="certPath != null"> |
|
|
<if test="certPath != null"> |
|
|
cert_path = #{certPath,jdbcType=VARCHAR}, |
|
|
cert_path = #{certPath,jdbcType=VARCHAR}, |
|
|
</if> |
|
|
</if> |
|
|
<if test="merchantId != null"> |
|
|
<if test="serialNo != null"> |
|
|
merchant_id = #{merchantId,jdbcType=VARCHAR}, |
|
|
serial_no = #{serialNo,jdbcType=VARCHAR}, |
|
|
</if> |
|
|
|
|
|
<if test="merchantName != null"> |
|
|
|
|
|
merchant_name = #{merchantName,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="cityStoreName != null"> |
|
|
|
|
|
city_store_name = #{cityStoreName,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="storeBrandName != null"> |
|
|
|
|
|
store_brand_name = #{storeBrandName,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="signType != null"> |
|
|
|
|
|
sign_type = #{signType,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="privateKey != null"> |
|
|
|
|
|
private_key = #{privateKey,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
</if> |
|
|
<if test="deviceInfo != null"> |
|
|
<if test="mchPrivateKey != null"> |
|
|
device_info = #{deviceInfo,jdbcType=VARCHAR}, |
|
|
mch_private_key = #{mchPrivateKey,jdbcType=VARCHAR}, |
|
|
</if> |
|
|
</if> |
|
|
<if test="spbillCreateIp != null"> |
|
|
<if test="updateId != null"> |
|
|
spbill_create_ip = #{spbillCreateIp,jdbcType=VARCHAR}, |
|
|
update_id = #{updateId,jdbcType=VARCHAR}, |
|
|
</if> |
|
|
</if> |
|
|
<if test="notifyUrl != null"> |
|
|
<if test="updateTime != null"> |
|
|
notify_url = #{notifyUrl,jdbcType=VARCHAR}, |
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP}, |
|
|
</if> |
|
|
</if> |
|
|
<if test="timeStamp != null"> |
|
|
<if test="timeStamp != null"> |
|
|
time_stamp = #{timeStamp,jdbcType=TIMESTAMP}, |
|
|
time_stamp = #{timeStamp,jdbcType=TIMESTAMP}, |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
</set> |
|
|
|
|
|
<where> |
|
|
|
|
|
mch_id = #{mchId,jdbcType=VARCHAR} |
|
|
</where> |
|
|
</where> |
|
|
</select> |
|
|
</update> |
|
|
</mapper> |
|
|
</mapper> |