mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-15 06:02:06 +08:00
资金管理移除充值相关内容、新增优惠活动相关接口、软件购买增加对应产品的优惠活动赠送时间
This commit is contained in:
-15
@@ -29,19 +29,4 @@
|
||||
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>
|
||||
-50
@@ -1,54 +1,4 @@
|
||||
<?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.incomeandexpense.IncomeExpenseDetailsMapper">
|
||||
<select id="getAccountDetailsPage" resultType="com.cf.imes.module.system.dal.dataobject.incomeandexpense.AccountDetailsDO">
|
||||
select i.id, i.business_no, i.order_no ,i.trade_type , i.income_expense_type, i.cash_amount_change, i.gift_amount_change, i.creator, i.create_time, i.organ_id ,i.purchase_id,
|
||||
p.total_amount, p.external_spent, p.account_balance_spent, p.gift_money_spent, p.payment_method, o.channel_code
|
||||
from income_expense_details i
|
||||
left join purchase_record p on i.purchase_id = p.id
|
||||
left join pay_order o on i.order_no = o.id
|
||||
where i.deleted = false
|
||||
<if test="reqVO.organId != null">
|
||||
AND i.organ_id = #{reqVO.organId}
|
||||
</if>
|
||||
<if test="reqVO.businessNo != null and reqVO.businessNo != ''">
|
||||
AND i.business_no like concat('%', #{reqVO.businessNo}, '%')
|
||||
</if>
|
||||
<if test="reqVO.orderNo != null and reqVO.orderNo != ''">
|
||||
AND (i.order_no = #{reqVO.orderNo} or i.purchase_id = #{reqVO.orderNo})
|
||||
</if>
|
||||
<if test="reqVO.tradeType != null">
|
||||
<choose>
|
||||
<when test="reqVO.tradeType == @com.cf.imes.module.system.enums.pay.TradeTypeEnum@RECHARGE.code">
|
||||
AND i.trade_type IN (
|
||||
#{reqVO.tradeType},
|
||||
'${@com.cf.imes.module.system.enums.pay.TradeTypeEnum@MANUAL_ADJUST.code}'
|
||||
)
|
||||
</when>
|
||||
<otherwise>
|
||||
AND i.trade_type = #{reqVO.tradeType}
|
||||
</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
<if test="reqVO.incomeExpenseType != null">
|
||||
AND i.income_expense_type = #{reqVO.incomeExpenseType}
|
||||
</if>
|
||||
<if test="reqVO.operateTime != null and reqVO.operateTime.length == 2">
|
||||
AND i.create_time between #{reqVO.operateTime[0]} and #{reqVO.operateTime[1]}
|
||||
</if>
|
||||
<if test="reqVO.productPrice != null">
|
||||
AND p.total_amount = #{reqVO.productPrice}
|
||||
</if>
|
||||
<if test="reqVO.rechargeAmount != null">
|
||||
AND i.cash_amount_change = #{reqVO.rechargeAmount}
|
||||
AND (i.trade_type = '${@com.cf.imes.module.system.enums.pay.TradeTypeEnum@RECHARGE.code}' or i.trade_type = '${@com.cf.imes.module.system.enums.pay.TradeTypeEnum@MANUAL_ADJUST.code}')
|
||||
</if>
|
||||
<if test="reqVO.giftAmount != null">
|
||||
AND i.gift_amount_change = #{reqVO.giftAmount}
|
||||
AND (i.trade_type = '${@com.cf.imes.module.system.enums.pay.TradeTypeEnum@RECHARGE.code}' or i.trade_type = '${@com.cf.imes.module.system.enums.pay.TradeTypeEnum@MANUAL_ADJUST.code}')
|
||||
</if>
|
||||
<if test="reqVO.operator != null and reqVO.operator !=''">
|
||||
AND i.creator like concat('%', #{reqVO.operator}, '%')
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
+1
-19
@@ -1,17 +1,6 @@
|
||||
<?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
|
||||
@@ -55,8 +44,7 @@
|
||||
<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
|
||||
sum(total_amount) as amount
|
||||
from purchase_record
|
||||
where deleted = false and initial != true;
|
||||
</select>
|
||||
@@ -71,12 +59,6 @@
|
||||
and create_time < CURDATE() + INTERVAL 1 DAY;
|
||||
</select>
|
||||
|
||||
<select id="getTotalRechargeUsageAmount" resultType="java.math.BigDecimal">
|
||||
select sum(account_balance_spent)
|
||||
from purchase_record
|
||||
where deleted = false;
|
||||
</select>
|
||||
|
||||
<sql id="dateCreate">
|
||||
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.StatisticsUnit@QUARTER.getValue()">
|
||||
,CONCAT(YEAR(o.create_time), '-', QUARTER(o.create_time)) as date
|
||||
|
||||
Reference in New Issue
Block a user