update 对接lianlian平台

This commit is contained in:
2024-04-18 17:52:19 +08:00
parent 80632ec121
commit c8d6859075
6 changed files with 172 additions and 120 deletions

View File

@@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsowell.thirdparty.mapper.ThirdpartySecretInfoMapper">
<resultMap type="ThirdpartySecretInfo" id="ThirdpartySecretInfoResult">
<resultMap type="com.jsowell.thirdparty.domain.ThirdpartySecretInfo" id="ThirdpartySecretInfoResult">
<result property="id" column="id" />
<result property="platformName" column="platform_name" />
<result property="platformType" column="platform_type" />
@@ -12,7 +12,7 @@
<result property="theirOperatorId" column="their_operator_id" />
<result property="theirOperatorSecret" column="their_operator_secret" />
<result property="theirDataSecret" column="their_data_secret" />
<result property="theirDataSecretIv" column="their_data_secret_Iv" />
<result property="theirDataSecretIv" column="their_data_secret_iv" />
<result property="theirSigSecret" column="their_sig_secret" />
<result property="ourOperatorSecret" column="our_operator_secret" />
<result property="ourDataSecret" column="our_data_secret" />
@@ -25,11 +25,18 @@
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectThirdpartySecretInfoVo">
select id, platform_name, platform_type, url_prefix, their_operator_id, their_operator_secret, their_data_secret, their_data_secret_Iv, their_sig_secret, our_operator_secret, our_data_secret, our_data_secret_iv, our_sig_secret, create_by, create_time, update_by, update_time, del_flag from thirdparty_secret_info
<sql id="Base_Column_List">
id, platform_name, platform_type, url_prefix, their_operator_id, their_operator_secret, their_data_secret,
their_data_secret_iv, their_sig_secret, our_operator_secret, our_data_secret, our_data_secret_iv,
our_sig_secret, create_by, create_time, update_by, update_time, del_flag
</sql>
<select id="selectThirdpartySecretInfoList" parameterType="ThirdpartySecretInfo" resultMap="ThirdpartySecretInfoResult">
<sql id="selectThirdpartySecretInfoVo">
select <include refid="Base_Column_List"/>
from thirdparty_secret_info
</sql>
<select id="selectThirdpartySecretInfoList" parameterType="com.jsowell.thirdparty.domain.ThirdpartySecretInfo" resultMap="ThirdpartySecretInfoResult">
<include refid="selectThirdpartySecretInfoVo"/>
<where>
<if test="platformName != null and platformName != ''"> and platform_name like concat('%', #{platformName}, '%')</if>
@@ -38,7 +45,7 @@
<if test="theirOperatorId != null and theirOperatorId != ''"> and their_operator_id = #{theirOperatorId}</if>
<if test="theirOperatorSecret != null and theirOperatorSecret != ''"> and their_operator_secret = #{theirOperatorSecret}</if>
<if test="theirDataSecret != null and theirDataSecret != ''"> and their_data_secret = #{theirDataSecret}</if>
<if test="theirDataSecretIv != null and theirDataSecretIv != ''"> and their_data_secret_Iv = #{theirDataSecretIv}</if>
<if test="theirDataSecretIv != null and theirDataSecretIv != ''"> and their_data_secret_iv = #{theirDataSecretIv}</if>
<if test="theirSigSecret != null and theirSigSecret != ''"> and their_sig_secret = #{theirSigSecret}</if>
<if test="ourOperatorSecret != null and ourOperatorSecret != ''"> and our_operator_secret = #{ourOperatorSecret}</if>
<if test="ourDataSecret != null and ourDataSecret != ''"> and our_data_secret = #{ourDataSecret}</if>
@@ -52,7 +59,7 @@
where id = #{id}
</select>
<insert id="insertThirdpartySecretInfo" parameterType="ThirdpartySecretInfo" useGeneratedKeys="true" keyProperty="id">
<insert id="insertThirdpartySecretInfo" parameterType="com.jsowell.thirdparty.domain.ThirdpartySecretInfo" useGeneratedKeys="true" keyProperty="id">
insert into thirdparty_secret_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="platformName != null">platform_name,</if>
@@ -61,7 +68,7 @@
<if test="theirOperatorId != null">their_operator_id,</if>
<if test="theirOperatorSecret != null">their_operator_secret,</if>
<if test="theirDataSecret != null">their_data_secret,</if>
<if test="theirDataSecretIv != null">their_data_secret_Iv,</if>
<if test="theirDataSecretIv != null">their_data_secret_iv,</if>
<if test="theirSigSecret != null">their_sig_secret,</if>
<if test="ourOperatorSecret != null">our_operator_secret,</if>
<if test="ourDataSecret != null">our_data_secret,</if>
@@ -94,7 +101,7 @@
</trim>
</insert>
<update id="updateThirdpartySecretInfo" parameterType="ThirdpartySecretInfo">
<update id="updateThirdpartySecretInfo" parameterType="com.jsowell.thirdparty.domain.ThirdpartySecretInfo">
update thirdparty_secret_info
<trim prefix="SET" suffixOverrides=",">
<if test="platformName != null">platform_name = #{platformName},</if>
@@ -103,7 +110,7 @@
<if test="theirOperatorId != null">their_operator_id = #{theirOperatorId},</if>
<if test="theirOperatorSecret != null">their_operator_secret = #{theirOperatorSecret},</if>
<if test="theirDataSecret != null">their_data_secret = #{theirDataSecret},</if>
<if test="theirDataSecretIv != null">their_data_secret_Iv = #{theirDataSecretIv},</if>
<if test="theirDataSecretIv != null">their_data_secret_iv = #{theirDataSecretIv},</if>
<if test="theirSigSecret != null">their_sig_secret = #{theirSigSecret},</if>
<if test="ourOperatorSecret != null">our_operator_secret = #{ourOperatorSecret},</if>
<if test="ourDataSecret != null">our_data_secret = #{ourDataSecret},</if>
@@ -128,4 +135,21 @@
#{id}
</foreach>
</delete>
<select id="queryByOperatorId" resultType="com.jsowell.pile.vo.ThirdPartySecretInfoVO">
select
t1.their_operator_id as theirOperatorId,
t1.their_operator_secret as theirOperatorSecret,
t1.their_data_secret as theirDataSecret,
t1.their_data_secret_iv as theirDataSecretIv,
t1.their_sig_secret as theirSigSecret,
t1.url_prefix as theirUrlPrefix,
t1.our_operator_secret as ourOperatorSecret,
t1.our_data_secret as ourDataSecret,
t1.our_data_secret_iv as ourDataSecretIv,
t1.our_sig_secret as ourSigSecret
from thirdparty_secret_info t1
where del_flag = '0'
and their_operator_id = #{theirOperatorId,jdbcType=VARCHAR}
</select>
</mapper>