统计:trade_statistics 字段【order_wallet_pay_price】改为【wallet_pay_price】

This commit is contained in:
owen 2023-10-16 22:09:20 +08:00
parent 7aa1ecceeb
commit b89ae001ad
8 changed files with 15 additions and 16 deletions

View File

@ -7,10 +7,10 @@ CREATE TABLE trade_statistics
order_create_count int DEFAULT 0 NOT NULL COMMENT '创建订单数', order_create_count int DEFAULT 0 NOT NULL COMMENT '创建订单数',
order_pay_count int DEFAULT 0 NOT NULL COMMENT '支付订单商品数', order_pay_count int DEFAULT 0 NOT NULL COMMENT '支付订单商品数',
order_pay_price int DEFAULT 0 NOT NULL COMMENT '总支付金额单位', order_pay_price int DEFAULT 0 NOT NULL COMMENT '总支付金额单位',
order_wallet_pay_price int DEFAULT 0 NOT NULL COMMENT '总支付金额余额单位',
after_sale_count int DEFAULT 0 NOT NULL COMMENT '退款订单数', after_sale_count int DEFAULT 0 NOT NULL COMMENT '退款订单数',
after_sale_refund_price int DEFAULT 0 NOT NULL COMMENT '总退款金额单位', after_sale_refund_price int DEFAULT 0 NOT NULL COMMENT '总退款金额单位',
brokerage_settlement_price int DEFAULT 0 NOT NULL COMMENT '佣金金额已结算单位', brokerage_settlement_price int DEFAULT 0 NOT NULL COMMENT '佣金金额已结算单位',
wallet_pay_price int DEFAULT 0 NOT NULL COMMENT '总支付金额余额单位',
recharge_pay_count int DEFAULT 0 NOT NULL COMMENT '充值订单数', recharge_pay_count int DEFAULT 0 NOT NULL COMMENT '充值订单数',
recharge_pay_price int DEFAULT 0 NOT NULL COMMENT '充值金额单位', recharge_pay_price int DEFAULT 0 NOT NULL COMMENT '充值金额单位',
recharge_refund_count int DEFAULT 0 NOT NULL COMMENT '充值退款订单数', recharge_refund_count int DEFAULT 0 NOT NULL COMMENT '充值退款订单数',

View File

@ -34,7 +34,7 @@ public class TradeTrendSummaryExcelVO {
private Integer expensePrice; private Integer expensePrice;
@ExcelProperty(value = "余额支付金额", converter = MoneyConvert.class) @ExcelProperty(value = "余额支付金额", converter = MoneyConvert.class)
private Integer orderWalletPayPrice; private Integer walletPayPrice;
@ExcelProperty(value = "支付佣金金额", converter = MoneyConvert.class) @ExcelProperty(value = "支付佣金金额", converter = MoneyConvert.class)
private Integer brokerageSettlementPrice; private Integer brokerageSettlementPrice;

View File

@ -23,7 +23,7 @@ public class TradeTrendSummaryRespVO {
private Integer orderPayPrice; private Integer orderPayPrice;
@Schema(description = "余额支付金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @Schema(description = "余额支付金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Integer orderWalletPayPrice; private Integer walletPayPrice;
@Schema(description = "订单退款金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @Schema(description = "订单退款金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Integer afterSaleRefundPrice; private Integer afterSaleRefundPrice;

View File

@ -66,7 +66,7 @@ public interface TradeStatisticsConvert {
// 营业额 = 商品支付金额 + 充值金额 // 营业额 = 商品支付金额 + 充值金额
.setTurnoverPrice(tradeStatistics.getOrderPayPrice() + tradeStatistics.getRechargePayPrice()) .setTurnoverPrice(tradeStatistics.getOrderPayPrice() + tradeStatistics.getRechargePayPrice())
// 支出金额 = 余额支付金额 + 支付佣金金额 + 商品退款金额 // 支出金额 = 余额支付金额 + 支付佣金金额 + 商品退款金额
.setExpensePrice(tradeStatistics.getOrderWalletPayPrice() + tradeStatistics.getBrokerageSettlementPrice() + tradeStatistics.getAfterSaleRefundPrice()); .setExpensePrice(tradeStatistics.getWalletPayPrice() + tradeStatistics.getBrokerageSettlementPrice() + tradeStatistics.getAfterSaleRefundPrice());
} }
TradeOrderCountRespVO convert(Long undelivered, Long pickUp, Long afterSaleApply, Long auditingWithdraw); TradeOrderCountRespVO convert(Long undelivered, Long pickUp, Long afterSaleApply, Long auditingWithdraw);

View File

@ -63,11 +63,10 @@ public class TradeStatisticsDO extends TenantBaseDO {
*/ */
private Integer brokerageSettlementPrice; private Integer brokerageSettlementPrice;
// TODO @疯狂walletPayPrice钱包支付金额
/** /**
* 总支付金额余额单位 * 总支付金额余额单位
*/ */
private Integer orderWalletPayPrice; private Integer walletPayPrice;
/** /**
* 充值订单数 * 充值订单数
* <p> * <p>

View File

@ -33,7 +33,7 @@ public class PayWalletStatisticsServiceImpl implements PayWalletStatisticsServic
Integer walletPayPrice = payWalletStatisticsMapper.selectPriceSummaryByBizTypeAndCreateTimeBetween( Integer walletPayPrice = payWalletStatisticsMapper.selectPriceSummaryByBizTypeAndCreateTimeBetween(
beginTime, endTime, PayWalletBizTypeEnum.PAYMENT.getType()); beginTime, endTime, PayWalletBizTypeEnum.PAYMENT.getType());
// 拼接 // 拼接
paySummary.setOrderWalletPayPrice(walletPayPrice) paySummary.setWalletPayPrice(walletPayPrice)
.setRechargeRefundCount(refundSummary.getRechargeRefundCount()) .setRechargeRefundCount(refundSummary.getRechargeRefundCount())
.setRechargeRefundPrice(refundSummary.getRechargeRefundPrice()); .setRechargeRefundPrice(refundSummary.getRechargeRefundPrice());
return paySummary; return paySummary;

View File

@ -13,7 +13,7 @@ public class WalletSummaryRespBO {
/** /**
* 总支付金额余额单位 * 总支付金额余额单位
*/ */
private Integer orderWalletPayPrice; private Integer walletPayPrice;
/** /**
* 充值订单数 * 充值订单数

View File

@ -15,14 +15,14 @@
resultType="cn.iocoder.yudao.module.statistics.controller.admin.trade.vo.TradeTrendSummaryRespVO"> resultType="cn.iocoder.yudao.module.statistics.controller.admin.trade.vo.TradeTrendSummaryRespVO">
SELECT SELECT
-- 营业额 = 商品支付金额 + 充值金额 -- 营业额 = 商品支付金额 + 充值金额
SUM(order_pay_price + recharge_pay_price) AS turnoverPrice, SUM(order_pay_price + recharge_pay_price) AS turnoverPrice,
SUM(order_pay_price) AS orderPayPrice, SUM(order_pay_price) AS orderPayPrice,
SUM(recharge_pay_price) AS rechargePrice, SUM(recharge_pay_price) AS rechargePrice,
-- 支出金额 = 余额支付金额 + 支付佣金金额 + 商品退款金额 -- 支出金额 = 余额支付金额 + 支付佣金金额 + 商品退款金额
SUM(order_wallet_pay_price + brokerage_settlement_price + after_sale_refund_price) AS expensePrice, SUM(wallet_pay_price + brokerage_settlement_price + after_sale_refund_price) AS expensePrice,
SUM(order_wallet_pay_price) AS orderWalletPayPrice, SUM(wallet_pay_price) AS walletPayPrice,
SUM(brokerage_settlement_price) AS brokerageSettlementPrice, SUM(brokerage_settlement_price) AS brokerageSettlementPrice,
SUM(after_sale_refund_price) AS afterSaleRefundPrice SUM(after_sale_refund_price) AS afterSaleRefundPrice
FROM trade_statistics FROM trade_statistics
WHERE time BETWEEN #{beginTime} AND #{endTime} WHERE time BETWEEN #{beginTime} AND #{endTime}
AND deleted = FALSE AND deleted = FALSE
@ -30,7 +30,7 @@
<select id="selectExpensePriceByTimeBetween" resultType="java.lang.Integer"> <select id="selectExpensePriceByTimeBetween" resultType="java.lang.Integer">
SELECT -- 支出金额 = 余额支付金额 + 支付佣金金额 + 商品退款金额 SELECT -- 支出金额 = 余额支付金额 + 支付佣金金额 + 商品退款金额
SUM(order_wallet_pay_price + brokerage_settlement_price + after_sale_refund_price) AS expensePrice SUM(wallet_pay_price + brokerage_settlement_price + after_sale_refund_price) AS expensePrice
FROM trade_statistics FROM trade_statistics
WHERE deleted = FALSE WHERE deleted = FALSE
<if test="beginTime != null"> <if test="beginTime != null">