接入运营商提现开票待办闭环

This commit is contained in:
jsowell
2026-07-17 17:48:14 +08:00
parent bc20330f1b
commit 3e299f40f9
14 changed files with 920 additions and 16 deletions

View File

@@ -0,0 +1,76 @@
<?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.ClearingWithdrawInvoiceMapper">
<resultMap id="BaseResultMap" type="com.jsowell.pile.domain.ClearingWithdrawInvoice">
<id column="id" property="id" />
<result column="withdraw_code" property="withdrawCode" />
<result column="merchant_id" property="merchantId" />
<result column="invoice_status" property="invoiceStatus" />
<result column="invoice_number" property="invoiceNumber" />
<result column="voucher_url" property="voucherUrl" />
<result column="submitted_by" property="submittedBy" />
<result column="submitted_name" property="submittedName" />
<result column="submitted_time" property="submittedTime" />
<result column="closed_by" property="closedBy" />
<result column="closed_name" property="closedName" />
<result column="closed_time" property="closedTime" />
<result column="close_reason" property="closeReason" />
<result column="create_by" property="createBy" />
<result column="create_time" property="createTime" />
<result column="update_by" property="updateBy" />
<result column="update_time" property="updateTime" />
<result column="remark" property="remark" />
<result column="del_flag" property="delFlag" />
</resultMap>
<sql id="BaseColumnList">
id, withdraw_code, merchant_id, invoice_status, invoice_number, voucher_url,
submitted_by, submitted_name, submitted_time, closed_by, closed_name, closed_time,
close_reason, create_by, create_time, update_by, update_time, remark, del_flag
</sql>
<select id="selectByWithdrawCode" resultMap="BaseResultMap">
select <include refid="BaseColumnList" />
from clearing_withdraw_invoice
where withdraw_code = #{withdrawCode}
and del_flag = '0'
limit 1
</select>
<insert id="insertSelective" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
insert into clearing_withdraw_invoice (
withdraw_code, merchant_id, invoice_status, create_by, create_time, del_flag
) values (
#{withdrawCode}, #{merchantId}, #{invoiceStatus}, #{createBy}, sysdate(), #{delFlag}
)
</insert>
<update id="markSubmitted">
update clearing_withdraw_invoice
set invoice_status = #{invoiceStatus},
invoice_number = #{invoiceNumber},
voucher_url = #{voucherUrl},
submitted_by = #{submittedBy},
submitted_name = #{submittedName},
submitted_time = #{submittedTime},
update_by = #{updateBy},
update_time = #{updateTime}
where id = #{id}
and invoice_status = 'PENDING'
and del_flag = '0'
</update>
<update id="markClosed">
update clearing_withdraw_invoice
set invoice_status = #{invoiceStatus},
closed_by = #{closedBy},
closed_name = #{closedName},
closed_time = #{closedTime},
close_reason = #{closeReason},
update_by = #{updateBy},
update_time = #{updateTime}
where id = #{id}
and invoice_status = 'PENDING'
and del_flag = '0'
</update>
</mapper>