汇付结算账户

This commit is contained in:
2023-06-12 15:52:00 +08:00
parent af4933b501
commit 71e33cdbf4
4 changed files with 345 additions and 0 deletions

View File

@@ -0,0 +1,133 @@
<?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.jsowell.pile.mapper.AdapaySettleAccountMapper">
<resultMap type="com.jsowell.pile.domain.AdapaySettleAccount" id="AdapaySettleAccountResult">
<result property="id" column="id" />
<result property="merchantId" column="merchant_id" />
<result property="adapayMemberId" column="adapay_member_id" />
<result property="cardId" column="card_id" />
<result property="cardName" column="card_name" />
<result property="certId" column="cert_id" />
<result property="certType" column="cert_type" />
<result property="telNo" column="tel_no" />
<result property="bankCode" column="bank_code" />
<result property="bankName" column="bank_name" />
<result property="bankAcctType" column="bank_acct_type" />
<result property="provCode" column="prov_code" />
<result property="areaCode" column="area_code" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectAdapaySettleAccountVo">
select id, merchant_id, adapay_member_id, card_id, card_name, cert_id, cert_type, tel_no, bank_code, bank_name, bank_acct_type, prov_code, area_code, create_time, create_by, update_time, update_by, del_flag from adapay_settle_account
</sql>
<select id="selectAdapaySettleAccountList" parameterType="com.jsowell.pile.domain.AdapaySettleAccount" resultMap="AdapaySettleAccountResult">
<include refid="selectAdapaySettleAccountVo"/>
<where>
<if test="merchantId != null and merchantId != ''"> and merchant_id = #{merchantId}</if>
<if test="adapayMemberId != null and adapayMemberId != ''"> and adapay_member_id = #{adapayMemberId}</if>
<if test="cardId != null and cardId != ''"> and card_id = #{cardId}</if>
<if test="cardName != null and cardName != ''"> and card_name like concat('%', #{cardName}, '%')</if>
<if test="certId != null and certId != ''"> and cert_id = #{certId}</if>
<if test="certType != null and certType != ''"> and cert_type = #{certType}</if>
<if test="telNo != null and telNo != ''"> and tel_no = #{telNo}</if>
<if test="bankCode != null and bankCode != ''"> and bank_code = #{bankCode}</if>
<if test="bankName != null and bankName != ''"> and bank_name like concat('%', #{bankName}, '%')</if>
<if test="bankAcctType != null and bankAcctType != ''"> and bank_acct_type = #{bankAcctType}</if>
<if test="provCode != null and provCode != ''"> and prov_code = #{provCode}</if>
<if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if>
</where>
</select>
<select id="selectAdapaySettleAccountById" parameterType="Long" resultMap="AdapaySettleAccountResult">
<include refid="selectAdapaySettleAccountVo"/>
where id = #{id}
</select>
<insert id="insertAdapaySettleAccount" parameterType="com.jsowell.pile.domain.AdapaySettleAccount">
insert into adapay_settle_account
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="merchantId != null">merchant_id,</if>
<if test="adapayMemberId != null">adapay_member_id,</if>
<if test="cardId != null">card_id,</if>
<if test="cardName != null">card_name,</if>
<if test="certId != null">cert_id,</if>
<if test="certType != null">cert_type,</if>
<if test="telNo != null">tel_no,</if>
<if test="bankCode != null">bank_code,</if>
<if test="bankName != null">bank_name,</if>
<if test="bankAcctType != null">bank_acct_type,</if>
<if test="provCode != null">prov_code,</if>
<if test="areaCode != null">area_code,</if>
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="delFlag != null">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="merchantId != null">#{merchantId},</if>
<if test="adapayMemberId != null">#{adapayMemberId},</if>
<if test="cardId != null">#{cardId},</if>
<if test="cardName != null">#{cardName},</if>
<if test="certId != null">#{certId},</if>
<if test="certType != null">#{certType},</if>
<if test="telNo != null">#{telNo},</if>
<if test="bankCode != null">#{bankCode},</if>
<if test="bankName != null">#{bankName},</if>
<if test="bankAcctType != null">#{bankAcctType},</if>
<if test="provCode != null">#{provCode},</if>
<if test="areaCode != null">#{areaCode},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="delFlag != null">#{delFlag},</if>
</trim>
</insert>
<update id="updateAdapaySettleAccount" parameterType="com.jsowell.pile.domain.AdapaySettleAccount">
update adapay_settle_account
<trim prefix="SET" suffixOverrides=",">
<if test="merchantId != null">merchant_id = #{merchantId},</if>
<if test="adapayMemberId != null">adapay_member_id = #{adapayMemberId},</if>
<if test="cardId != null">card_id = #{cardId},</if>
<if test="cardName != null">card_name = #{cardName},</if>
<if test="certId != null">cert_id = #{certId},</if>
<if test="certType != null">cert_type = #{certType},</if>
<if test="telNo != null">tel_no = #{telNo},</if>
<if test="bankCode != null">bank_code = #{bankCode},</if>
<if test="bankName != null">bank_name = #{bankName},</if>
<if test="bankAcctType != null">bank_acct_type = #{bankAcctType},</if>
<if test="provCode != null">prov_code = #{provCode},</if>
<if test="areaCode != null">area_code = #{areaCode},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAdapaySettleAccountById" parameterType="Long">
delete from adapay_settle_account where id = #{id}
</delete>
<delete id="deleteAdapaySettleAccountByIds" parameterType="String">
delete from adapay_settle_account where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>