新增账户可开金额/产品有效期总览接口、补充购买记录的赠送时长记录和展示

This commit is contained in:
gaoqr
2025-11-05 14:21:42 +08:00
parent 86e0adb8f2
commit 114d566920
11 changed files with 164 additions and 10 deletions
@@ -1,6 +1,17 @@
<?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.cf.imes.module.system.dal.mysql.funds.purchase.PurchaseRecordMapper">
<select id="getInvoicingAmount" resultType="java.math.BigDecimal">
SELECT SUM(
CASE
WHEN initial = TRUE THEN total_amount
ELSE account_balance_spent
END
) AS total_spent
FROM purchase_record
where organ_id = #{organId} and is_invocing = '${@com.cf.imes.module.system.enums.pay.InvoiceStatusEnum@INVOICABLE.code}' and deleted = false and initial != true;
</select>
<!-- 查询机构下开票金额统计:可开票、开票中、已开票-->
<select id="getOrgInvoiceAmountStatistics" resultType="com.cf.imes.module.system.controller.admin.funds.invoice.vo.InvoiceAmountRespVO">
SELECT