1、组织创建新增产品购买记录;2、新增管理端销售管理、充值管理接口;3、新增修正双端账户明细;4、修正资金总览、账户总览信息接口数据;

This commit is contained in:
gaoqr
2025-09-12 18:23:44 +08:00
parent f47e915f54
commit 4cd5869b81
54 changed files with 1210 additions and 439 deletions
@@ -29,4 +29,19 @@
GROUP BY date
</select>
<select id="getTotalRechargeAmount" resultType="java.math.BigDecimal">
select sum(amount) as amount
from system_organization_amount
where deleted = false
</select>
<select id="getTotalAvailableAmount"
resultType="com.cf.imes.module.system.controller.admin.funds.organamount.vo.OrganAvailableAmountRespVO">
select
sum(amount) as amount,
sum(gift_amount) as giftAmount
from system_organization_amount
where deleted = false
</select>
</mapper>
@@ -0,0 +1,29 @@
<?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.pay.PayOrderMapper">
<select id="getRechargeDetailsPage" resultType="com.cf.imes.module.system.dal.dataobject.pay.PayOrderRechargeDetailDO">
select o.id, o.organ_id, o.pay_no, o.price, o.purchase_id, o.creator, o.create_time, p.total_amount, p.account_balance_spent, p.gift_money_spent
from pay_order o
left join purchase_record p on o.purchase_id = p.id
where o.status = '${@com.cf.imes.module.system.enums.pay.PayOrderStatusEnum@SUCCESS.status}'
<if test="reqVO.organId != null">
AND o.organ_id = #{reqVO.organId}
</if>
<if test="reqVO.productPrice != null">
AND p.total_amount = #{reqVO.productPrice}
</if>
<if test="reqVO.operator != null and reqVO.operator != ''">
AND o.creator = #{reqVO.operator}
</if>
<if test="reqVO.createTime != null and reqVO.createTime.length == 2">
AND o.create_time &gt;= #{reqVO.createTime[0]}
AND o.create_time &lt;= #{reqVO.createTime[1]}
</if>
order by o.id desc;
</select>
<select id="getRechargeTotalAmount" resultType="java.math.BigDecimal">
select sum(price) from pay_order
where status = '${@com.cf.imes.module.system.enums.pay.PayOrderStatusEnum@SUCCESS.status}' and deleted = false
</select>
</mapper>
@@ -23,4 +23,18 @@
#{id}
</foreach>
</select>
<select id="getTotalSales"
resultType="com.cf.imes.module.system.controller.admin.funds.organamount.vo.TotalSalesAmountRespVO">
select
sum(total_amount - gift_money_spent) as amount,
sum(gift_money_spent) as giftAmount
from purchase_record;
</select>
<select id="getTotalRechargeUsageAmount" resultType="java.math.BigDecimal">
select sum(account_balance_spent)
from purchase_record
where deleted = false;
</select>
</mapper>