Commit b89ae001ad01ef552874b37738d69406011b9f24
1 parent
7aa1ecce
统计:trade_statistics 字段【order_wallet_pay_price】改为【wallet_pay_price】
Showing
8 changed files
with
15 additions
and
16 deletions
sql/mysql/statistics.sql
| ... | ... | @@ -7,10 +7,10 @@ CREATE TABLE trade_statistics |
| 7 | 7 | order_create_count int DEFAULT 0 NOT NULL COMMENT '创建订单数', |
| 8 | 8 | order_pay_count int DEFAULT 0 NOT NULL COMMENT '支付订单商品数', |
| 9 | 9 | order_pay_price int DEFAULT 0 NOT NULL COMMENT '总支付金额,单位:分', |
| 10 | - order_wallet_pay_price int DEFAULT 0 NOT NULL COMMENT '总支付金额(余额),单位:分', | |
| 11 | 10 | after_sale_count int DEFAULT 0 NOT NULL COMMENT '退款订单数', |
| 12 | 11 | after_sale_refund_price int DEFAULT 0 NOT NULL COMMENT '总退款金额,单位:分', |
| 13 | 12 | brokerage_settlement_price int DEFAULT 0 NOT NULL COMMENT '佣金金额(已结算),单位:分', |
| 13 | + wallet_pay_price int DEFAULT 0 NOT NULL COMMENT '总支付金额(余额),单位:分', | |
| 14 | 14 | recharge_pay_count int DEFAULT 0 NOT NULL COMMENT '充值订单数', |
| 15 | 15 | recharge_pay_price int DEFAULT 0 NOT NULL COMMENT '充值金额,单位:分', |
| 16 | 16 | recharge_refund_count int DEFAULT 0 NOT NULL COMMENT '充值退款订单数', | ... | ... |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/controller/admin/trade/vo/TradeTrendSummaryExcelVO.java
| ... | ... | @@ -34,7 +34,7 @@ public class TradeTrendSummaryExcelVO { |
| 34 | 34 | private Integer expensePrice; |
| 35 | 35 | |
| 36 | 36 | @ExcelProperty(value = "余额支付金额", converter = MoneyConvert.class) |
| 37 | - private Integer orderWalletPayPrice; | |
| 37 | + private Integer walletPayPrice; | |
| 38 | 38 | |
| 39 | 39 | @ExcelProperty(value = "支付佣金金额", converter = MoneyConvert.class) |
| 40 | 40 | private Integer brokerageSettlementPrice; | ... | ... |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/controller/admin/trade/vo/TradeTrendSummaryRespVO.java
| ... | ... | @@ -23,7 +23,7 @@ public class TradeTrendSummaryRespVO { |
| 23 | 23 | private Integer orderPayPrice; |
| 24 | 24 | |
| 25 | 25 | @Schema(description = "余额支付金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 26 | - private Integer orderWalletPayPrice; | |
| 26 | + private Integer walletPayPrice; | |
| 27 | 27 | |
| 28 | 28 | @Schema(description = "订单退款金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 29 | 29 | private Integer afterSaleRefundPrice; | ... | ... |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/convert/trade/TradeStatisticsConvert.java
| ... | ... | @@ -66,7 +66,7 @@ public interface TradeStatisticsConvert { |
| 66 | 66 | // 营业额 = 商品支付金额 + 充值金额 |
| 67 | 67 | .setTurnoverPrice(tradeStatistics.getOrderPayPrice() + tradeStatistics.getRechargePayPrice()) |
| 68 | 68 | // 支出金额 = 余额支付金额 + 支付佣金金额 + 商品退款金额 |
| 69 | - .setExpensePrice(tradeStatistics.getOrderWalletPayPrice() + tradeStatistics.getBrokerageSettlementPrice() + tradeStatistics.getAfterSaleRefundPrice()); | |
| 69 | + .setExpensePrice(tradeStatistics.getWalletPayPrice() + tradeStatistics.getBrokerageSettlementPrice() + tradeStatistics.getAfterSaleRefundPrice()); | |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | TradeOrderCountRespVO convert(Long undelivered, Long pickUp, Long afterSaleApply, Long auditingWithdraw); | ... | ... |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/dataobject/trade/TradeStatisticsDO.java
| ... | ... | @@ -63,11 +63,10 @@ public class TradeStatisticsDO extends TenantBaseDO { |
| 63 | 63 | */ |
| 64 | 64 | private Integer brokerageSettlementPrice; |
| 65 | 65 | |
| 66 | - // TODO @疯狂:walletPayPrice,钱包支付金额 | |
| 67 | 66 | /** |
| 68 | 67 | * 总支付金额(余额),单位:分 |
| 69 | 68 | */ |
| 70 | - private Integer orderWalletPayPrice; | |
| 69 | + private Integer walletPayPrice; | |
| 71 | 70 | /** |
| 72 | 71 | * 充值订单数 |
| 73 | 72 | * <p> | ... | ... |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/pay/PayWalletStatisticsServiceImpl.java
| ... | ... | @@ -33,7 +33,7 @@ public class PayWalletStatisticsServiceImpl implements PayWalletStatisticsServic |
| 33 | 33 | Integer walletPayPrice = payWalletStatisticsMapper.selectPriceSummaryByBizTypeAndCreateTimeBetween( |
| 34 | 34 | beginTime, endTime, PayWalletBizTypeEnum.PAYMENT.getType()); |
| 35 | 35 | // 拼接 |
| 36 | - paySummary.setOrderWalletPayPrice(walletPayPrice) | |
| 36 | + paySummary.setWalletPayPrice(walletPayPrice) | |
| 37 | 37 | .setRechargeRefundCount(refundSummary.getRechargeRefundCount()) |
| 38 | 38 | .setRechargeRefundPrice(refundSummary.getRechargeRefundPrice()); |
| 39 | 39 | return paySummary; | ... | ... |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/bo/WalletSummaryRespBO.java
yudao-module-mall/yudao-module-statistics-biz/src/main/resources/mapper/trade/TradeStatisticsMapper.xml
| ... | ... | @@ -15,14 +15,14 @@ |
| 15 | 15 | resultType="cn.iocoder.yudao.module.statistics.controller.admin.trade.vo.TradeTrendSummaryRespVO"> |
| 16 | 16 | SELECT |
| 17 | 17 | -- 营业额 = 商品支付金额 + 充值金额 |
| 18 | - SUM(order_pay_price + recharge_pay_price) AS turnoverPrice, | |
| 19 | - SUM(order_pay_price) AS orderPayPrice, | |
| 20 | - SUM(recharge_pay_price) AS rechargePrice, | |
| 18 | + SUM(order_pay_price + recharge_pay_price) AS turnoverPrice, | |
| 19 | + SUM(order_pay_price) AS orderPayPrice, | |
| 20 | + SUM(recharge_pay_price) AS rechargePrice, | |
| 21 | 21 | -- 支出金额 = 余额支付金额 + 支付佣金金额 + 商品退款金额 |
| 22 | - SUM(order_wallet_pay_price + brokerage_settlement_price + after_sale_refund_price) AS expensePrice, | |
| 23 | - SUM(order_wallet_pay_price) AS orderWalletPayPrice, | |
| 24 | - SUM(brokerage_settlement_price) AS brokerageSettlementPrice, | |
| 25 | - SUM(after_sale_refund_price) AS afterSaleRefundPrice | |
| 22 | + SUM(wallet_pay_price + brokerage_settlement_price + after_sale_refund_price) AS expensePrice, | |
| 23 | + SUM(wallet_pay_price) AS walletPayPrice, | |
| 24 | + SUM(brokerage_settlement_price) AS brokerageSettlementPrice, | |
| 25 | + SUM(after_sale_refund_price) AS afterSaleRefundPrice | |
| 26 | 26 | FROM trade_statistics |
| 27 | 27 | WHERE time BETWEEN #{beginTime} AND #{endTime} |
| 28 | 28 | AND deleted = FALSE |
| ... | ... | @@ -30,7 +30,7 @@ |
| 30 | 30 | |
| 31 | 31 | <select id="selectExpensePriceByTimeBetween" resultType="java.lang.Integer"> |
| 32 | 32 | SELECT -- 支出金额 = 余额支付金额 + 支付佣金金额 + 商品退款金额 |
| 33 | - SUM(order_wallet_pay_price + brokerage_settlement_price + after_sale_refund_price) AS expensePrice | |
| 33 | + SUM(wallet_pay_price + brokerage_settlement_price + after_sale_refund_price) AS expensePrice | |
| 34 | 34 | FROM trade_statistics |
| 35 | 35 | WHERE deleted = FALSE |
| 36 | 36 | <if test="beginTime != null"> | ... | ... |