diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/convert/trade/TradeStatisticsConvert.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/convert/trade/TradeStatisticsConvert.java index 1f36f26b95..a2bce34d9d 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/convert/trade/TradeStatisticsConvert.java +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/convert/trade/TradeStatisticsConvert.java @@ -1,14 +1,14 @@ package cn.iocoder.yudao.module.statistics.convert.trade; -import cn.iocoder.yudao.module.pay.api.wallet.dto.WalletSummaryRespDTO; +import cn.iocoder.yudao.module.statistics.service.trade.bo.WalletSummaryRespBO; import cn.iocoder.yudao.module.statistics.controller.admin.trade.vo.TradeStatisticsComparisonRespVO; import cn.iocoder.yudao.module.statistics.controller.admin.trade.vo.TradeSummaryRespVO; import cn.iocoder.yudao.module.statistics.controller.admin.trade.vo.TradeTrendSummaryExcelVO; import cn.iocoder.yudao.module.statistics.controller.admin.trade.vo.TradeTrendSummaryRespVO; import cn.iocoder.yudao.module.statistics.dal.dataobject.trade.TradeStatisticsDO; +import cn.iocoder.yudao.module.statistics.service.trade.bo.TradeOrderSummaryRespBO; import cn.iocoder.yudao.module.statistics.service.trade.bo.TradeSummaryRespBO; -import cn.iocoder.yudao.module.trade.api.aftersale.dto.AfterSaleSummaryRespDTO; -import cn.iocoder.yudao.module.trade.api.order.dto.TradeOrderSummaryRespDTO; +import cn.iocoder.yudao.module.statistics.service.trade.bo.AfterSaleSummaryRespBO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; @@ -46,8 +46,8 @@ public interface TradeStatisticsConvert { List convertList02(List list); - TradeStatisticsDO convert(LocalDateTime time, TradeOrderSummaryRespDTO orderSummary, - AfterSaleSummaryRespDTO afterSaleSummary, Integer brokerageSettlementPrice, - WalletSummaryRespDTO walletSummary); + TradeStatisticsDO convert(LocalDateTime time, TradeOrderSummaryRespBO orderSummary, + AfterSaleSummaryRespBO afterSaleSummary, Integer brokerageSettlementPrice, + WalletSummaryRespBO walletSummary); } diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/AfterSaleStatisticsMapper.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/AfterSaleStatisticsMapper.java new file mode 100644 index 0000000000..17e9b1be3d --- /dev/null +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/AfterSaleStatisticsMapper.java @@ -0,0 +1,22 @@ +package cn.iocoder.yudao.module.statistics.dal.mysql.trade; + +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.statistics.dal.dataobject.trade.TradeStatisticsDO; +import cn.iocoder.yudao.module.statistics.service.trade.bo.AfterSaleSummaryRespBO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.time.LocalDateTime; + +/** + * 交易统计 Mapper + * + * @author owen + */ +@Mapper +public interface AfterSaleStatisticsMapper extends BaseMapperX { + + AfterSaleSummaryRespBO selectSummaryByRefundTimeBetween(@Param("beginTime") LocalDateTime beginTime, + @Param("endTime") LocalDateTime endTime); + +} diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/BrokerageStatisticsMapper.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/BrokerageStatisticsMapper.java new file mode 100644 index 0000000000..cf109846ff --- /dev/null +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/BrokerageStatisticsMapper.java @@ -0,0 +1,23 @@ +package cn.iocoder.yudao.module.statistics.dal.mysql.trade; + +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.statistics.dal.dataobject.trade.TradeStatisticsDO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.time.LocalDateTime; + +/** + * 交易统计 Mapper + * + * @author owen + */ +@Mapper +public interface BrokerageStatisticsMapper extends BaseMapperX { + + Integer selectSummaryPriceByStatusAndUnfreezeTimeBetween(@Param("bizType") Integer bizType, + @Param("status") Integer status, + @Param("beginTime") LocalDateTime beginTime, + @Param("endTime") LocalDateTime endTime); + +} diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/PayWalletStatisticsMapper.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/PayWalletStatisticsMapper.java new file mode 100644 index 0000000000..126a1557b1 --- /dev/null +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/PayWalletStatisticsMapper.java @@ -0,0 +1,30 @@ +package cn.iocoder.yudao.module.statistics.dal.mysql.trade; + +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.statistics.service.trade.bo.WalletSummaryRespBO; +import cn.iocoder.yudao.module.statistics.dal.dataobject.trade.TradeStatisticsDO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.time.LocalDateTime; + +/** + * 交易统计 Mapper + * + * @author owen + */ +@Mapper +public interface PayWalletStatisticsMapper extends BaseMapperX { + + WalletSummaryRespBO selectRechargeSummaryByPayTimeBetween(@Param("beginTime") LocalDateTime beginTime, + @Param("endTime") LocalDateTime endTime, + @Param("payStatus") Boolean payStatus); + + WalletSummaryRespBO selectRechargeSummaryByRefundTimeBetween(@Param("beginTime") LocalDateTime beginTime, + @Param("endTime") LocalDateTime endTime, + @Param("refundStatus") Integer refundStatus); + + Integer selectPriceSummaryByBizTypeAndCreateTimeBetween(@Param("beginTime") LocalDateTime beginTime, + @Param("endTime") LocalDateTime endTime, + @Param("bizType") Integer bizType); +} diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/TradeOrderStatisticsMapper.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/TradeOrderStatisticsMapper.java new file mode 100644 index 0000000000..068ea85981 --- /dev/null +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/TradeOrderStatisticsMapper.java @@ -0,0 +1,22 @@ +package cn.iocoder.yudao.module.statistics.dal.mysql.trade; + +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.statistics.dal.dataobject.trade.TradeStatisticsDO; +import cn.iocoder.yudao.module.statistics.service.trade.bo.TradeOrderSummaryRespBO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.time.LocalDateTime; + +/** + * 交易统计 Mapper + * + * @author owen + */ +@Mapper +public interface TradeOrderStatisticsMapper extends BaseMapperX { + + TradeOrderSummaryRespBO selectSummaryByPayTimeBetween(@Param("beginTime") LocalDateTime beginTime, + @Param("endTime") LocalDateTime endTime); + +} diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/AfterSaleStatisticsService.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/AfterSaleStatisticsService.java new file mode 100644 index 0000000000..ea805967ba --- /dev/null +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/AfterSaleStatisticsService.java @@ -0,0 +1,23 @@ +package cn.iocoder.yudao.module.statistics.service.trade; + +import cn.iocoder.yudao.module.statistics.service.trade.bo.AfterSaleSummaryRespBO; + +import java.time.LocalDateTime; + +/** + * 售后统计 Service 接口 + * + * @author owen + */ +public interface AfterSaleStatisticsService { + + /** + * 获取售后单统计 + * + * @param beginTime 起始时间 + * @param endTime 截止时间 + * @return 售后统计结果 + */ + AfterSaleSummaryRespBO getAfterSaleSummary(LocalDateTime beginTime, LocalDateTime endTime); + +} diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/AfterSaleStatisticsServiceImpl.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/AfterSaleStatisticsServiceImpl.java new file mode 100644 index 0000000000..cc2ec4af93 --- /dev/null +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/AfterSaleStatisticsServiceImpl.java @@ -0,0 +1,28 @@ +package cn.iocoder.yudao.module.statistics.service.trade; + +import cn.iocoder.yudao.module.statistics.dal.mysql.trade.AfterSaleStatisticsMapper; +import cn.iocoder.yudao.module.statistics.service.trade.bo.AfterSaleSummaryRespBO; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import javax.annotation.Resource; +import java.time.LocalDateTime; + +/** + * 售后统计 Service 实现类 + * + * @author owen + */ +@Service +@Validated +public class AfterSaleStatisticsServiceImpl implements AfterSaleStatisticsService { + + @Resource + private AfterSaleStatisticsMapper afterSaleStatisticsMapper; + + @Override + public AfterSaleSummaryRespBO getAfterSaleSummary(LocalDateTime beginTime, LocalDateTime endTime) { + return afterSaleStatisticsMapper.selectSummaryByRefundTimeBetween(beginTime, endTime); + } + +} diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/BrokerageStatisticsService.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/BrokerageStatisticsService.java new file mode 100644 index 0000000000..7d1bfa3471 --- /dev/null +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/BrokerageStatisticsService.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.module.statistics.service.trade; + +import java.time.LocalDateTime; + +/** + * 分销统计 Service 接口 + * + * @author owen + */ +public interface BrokerageStatisticsService { + + /** + * 获取已结算的佣金金额 + * + * @param beginTime 起始时间 + * @param endTime 截止时间 + * @return 已结算的佣金金额 + */ + Integer getBrokerageSettlementPriceSummary(LocalDateTime beginTime, LocalDateTime endTime); + +} diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/BrokerageStatisticsServiceImpl.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/BrokerageStatisticsServiceImpl.java new file mode 100644 index 0000000000..8c29166e57 --- /dev/null +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/BrokerageStatisticsServiceImpl.java @@ -0,0 +1,31 @@ +package cn.iocoder.yudao.module.statistics.service.trade; + +import cn.iocoder.yudao.module.statistics.dal.mysql.trade.BrokerageStatisticsMapper; +import cn.iocoder.yudao.module.trade.enums.brokerage.BrokerageRecordBizTypeEnum; +import cn.iocoder.yudao.module.trade.enums.brokerage.BrokerageRecordStatusEnum; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import javax.annotation.Resource; +import java.time.LocalDateTime; + +/** + * 分销统计 Service 实现类 + * + * @author owen + */ +@Service +@Validated +public class BrokerageStatisticsServiceImpl implements BrokerageStatisticsService { + + @Resource + private BrokerageStatisticsMapper brokerageStatisticsMapper; + + @Override + public Integer getBrokerageSettlementPriceSummary(LocalDateTime beginTime, LocalDateTime endTime) { + return brokerageStatisticsMapper.selectSummaryPriceByStatusAndUnfreezeTimeBetween( + BrokerageRecordBizTypeEnum.ORDER.getType(), BrokerageRecordStatusEnum.SETTLEMENT.getStatus(), + beginTime, endTime); + } + +} diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/PayWalletStatisticsService.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/PayWalletStatisticsService.java new file mode 100644 index 0000000000..6eb03d7f80 --- /dev/null +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/PayWalletStatisticsService.java @@ -0,0 +1,23 @@ +package cn.iocoder.yudao.module.statistics.service.trade; + +import cn.iocoder.yudao.module.statistics.service.trade.bo.WalletSummaryRespBO; + +import java.time.LocalDateTime; + +/** + * 钱包统计 Service 接口 + * + * @author owen + */ +public interface PayWalletStatisticsService { + + /** + * 获取钱包统计 + * + * @param beginTime 起始时间 + * @param endTime 截止时间 + * @return 钱包统计 + */ + WalletSummaryRespBO getWalletSummary(LocalDateTime beginTime, LocalDateTime endTime); + +} diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/PayWalletStatisticsServiceImpl.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/PayWalletStatisticsServiceImpl.java new file mode 100644 index 0000000000..95f073de1e --- /dev/null +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/PayWalletStatisticsServiceImpl.java @@ -0,0 +1,41 @@ +package cn.iocoder.yudao.module.statistics.service.trade; + +import cn.iocoder.yudao.module.statistics.service.trade.bo.WalletSummaryRespBO; +import cn.iocoder.yudao.module.pay.enums.member.PayWalletBizTypeEnum; +import cn.iocoder.yudao.module.pay.enums.refund.PayRefundStatusEnum; +import cn.iocoder.yudao.module.statistics.dal.mysql.trade.PayWalletStatisticsMapper; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import javax.annotation.Resource; +import java.time.LocalDateTime; + +/** + * 钱包统计 Service 实现类 + * + * @author owen + */ +@Service +@Validated +public class PayWalletStatisticsServiceImpl implements PayWalletStatisticsService { + + @Resource + private PayWalletStatisticsMapper payWalletStatisticsMapper; + + @Override + public WalletSummaryRespBO getWalletSummary(LocalDateTime beginTime, LocalDateTime endTime) { + WalletSummaryRespBO paySummary = payWalletStatisticsMapper.selectRechargeSummaryByPayTimeBetween( + beginTime, endTime, true); + WalletSummaryRespBO refundSummary = payWalletStatisticsMapper.selectRechargeSummaryByRefundTimeBetween( + beginTime, endTime, PayRefundStatusEnum.SUCCESS.getStatus()); + Integer walletPayPrice = payWalletStatisticsMapper.selectPriceSummaryByBizTypeAndCreateTimeBetween( + beginTime, endTime, PayWalletBizTypeEnum.PAYMENT.getType()); + + paySummary.setOrderWalletPayPrice(walletPayPrice); + paySummary.setRechargeRefundCount(refundSummary.getRechargeRefundCount()); + paySummary.setRechargeRefundPrice(refundSummary.getRechargeRefundPrice()); + + return paySummary; + } + +} diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/TradeOrderStatisticsService.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/TradeOrderStatisticsService.java new file mode 100644 index 0000000000..8ae3f89a37 --- /dev/null +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/TradeOrderStatisticsService.java @@ -0,0 +1,23 @@ +package cn.iocoder.yudao.module.statistics.service.trade; + +import cn.iocoder.yudao.module.statistics.service.trade.bo.TradeOrderSummaryRespBO; + +import java.time.LocalDateTime; + +/** + * 交易订单统计 Service 接口 + * + * @author owen + */ +public interface TradeOrderStatisticsService { + + /** + * 获取订单统计 + * + * @param beginTime 起始时间 + * @param endTime 截止时间 + * @return 订单统计结果 + */ + TradeOrderSummaryRespBO getOrderSummary(LocalDateTime beginTime, LocalDateTime endTime); + +} diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/TradeOrderStatisticsServiceImpl.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/TradeOrderStatisticsServiceImpl.java new file mode 100644 index 0000000000..d3449abd80 --- /dev/null +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/TradeOrderStatisticsServiceImpl.java @@ -0,0 +1,28 @@ +package cn.iocoder.yudao.module.statistics.service.trade; + +import cn.iocoder.yudao.module.statistics.dal.mysql.trade.TradeOrderStatisticsMapper; +import cn.iocoder.yudao.module.statistics.service.trade.bo.TradeOrderSummaryRespBO; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import javax.annotation.Resource; +import java.time.LocalDateTime; + +/** + * 交易订单统计 Service 实现类 + * + * @author owen + */ +@Service +@Validated +public class TradeOrderStatisticsServiceImpl implements TradeOrderStatisticsService { + + @Resource + private TradeOrderStatisticsMapper tradeOrderStatisticsMapper; + + @Override + public TradeOrderSummaryRespBO getOrderSummary(LocalDateTime beginTime, LocalDateTime endTime) { + return tradeOrderStatisticsMapper.selectSummaryByPayTimeBetween(beginTime, endTime); + } + +} diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/TradeStatisticsServiceImpl.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/TradeStatisticsServiceImpl.java index fdaf50f1d9..1fc075b0eb 100644 --- a/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/TradeStatisticsServiceImpl.java +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/TradeStatisticsServiceImpl.java @@ -2,8 +2,7 @@ package cn.iocoder.yudao.module.statistics.service.trade; import cn.hutool.core.date.LocalDateTimeUtil; import cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils; -import cn.iocoder.yudao.module.pay.api.wallet.PayWalletApi; -import cn.iocoder.yudao.module.pay.api.wallet.dto.WalletSummaryRespDTO; +import cn.iocoder.yudao.module.statistics.service.trade.bo.WalletSummaryRespBO; import cn.iocoder.yudao.module.statistics.controller.admin.trade.vo.TradeStatisticsComparisonRespVO; import cn.iocoder.yudao.module.statistics.controller.admin.trade.vo.TradeSummaryRespVO; import cn.iocoder.yudao.module.statistics.controller.admin.trade.vo.TradeTrendSummaryRespVO; @@ -11,11 +10,8 @@ import cn.iocoder.yudao.module.statistics.convert.trade.TradeStatisticsConvert; import cn.iocoder.yudao.module.statistics.dal.dataobject.trade.TradeStatisticsDO; import cn.iocoder.yudao.module.statistics.dal.mysql.trade.TradeStatisticsMapper; import cn.iocoder.yudao.module.statistics.service.trade.bo.TradeSummaryRespBO; -import cn.iocoder.yudao.module.trade.api.aftersale.TradeAfterSaleApi; -import cn.iocoder.yudao.module.trade.api.aftersale.dto.AfterSaleSummaryRespDTO; -import cn.iocoder.yudao.module.trade.api.brokerage.TradeBrokerageApi; -import cn.iocoder.yudao.module.trade.api.order.TradeOrderApi; -import cn.iocoder.yudao.module.trade.api.order.dto.TradeOrderSummaryRespDTO; +import cn.iocoder.yudao.module.statistics.service.trade.bo.AfterSaleSummaryRespBO; +import cn.iocoder.yudao.module.statistics.service.trade.bo.TradeOrderSummaryRespBO; import org.springframework.stereotype.Service; import org.springframework.util.StopWatch; import org.springframework.validation.annotation.Validated; @@ -37,18 +33,14 @@ public class TradeStatisticsServiceImpl implements TradeStatisticsService { @Resource private TradeStatisticsMapper tradeStatisticsMapper; - // TODO @疯狂:统计逻辑,自己服务 mapper 去统计,不要调用其它服务 API; - // 主要的考虑点,其它服务是在线的业务,统计是离线业务,尽量不占用他们的 db 资源; - // 统计服务,从建议使用从库,或者从 mysql 抽取到单独的 clickhouse 或者其它的大数据组件; - @Resource - private TradeOrderApi tradeOrderApi; + private TradeOrderStatisticsService tradeOrderStatisticsService; @Resource - private TradeAfterSaleApi tradeAfterSaleApi; + private AfterSaleStatisticsService afterSaleStatisticsService; @Resource - private TradeBrokerageApi tradeBrokerageApi; + private BrokerageStatisticsService brokerageStatisticsService; @Resource - private PayWalletApi payWalletApi; + private PayWalletStatisticsService payWalletStatisticsService; @Override public TradeStatisticsComparisonRespVO getTradeSummaryComparison() { @@ -90,19 +82,19 @@ public class TradeStatisticsServiceImpl implements TradeStatisticsService { // 统计 StopWatch stopWatch = new StopWatch("交易统计"); stopWatch.start("统计订单"); - TradeOrderSummaryRespDTO orderSummary = tradeOrderApi.getOrderSummary(beginTime, endTime); + TradeOrderSummaryRespBO orderSummary = tradeOrderStatisticsService.getOrderSummary(beginTime, endTime); stopWatch.stop(); stopWatch.start("统计售后"); - AfterSaleSummaryRespDTO afterSaleSummary = tradeAfterSaleApi.getAfterSaleSummary(beginTime, endTime); + AfterSaleSummaryRespBO afterSaleSummary = afterSaleStatisticsService.getAfterSaleSummary(beginTime, endTime); stopWatch.stop(); stopWatch.start("统计佣金"); - Integer brokerageSettlementPrice = tradeBrokerageApi.getBrokerageSettlementPriceSummary(beginTime, endTime); + Integer brokerageSettlementPrice = brokerageStatisticsService.getBrokerageSettlementPriceSummary(beginTime, endTime); stopWatch.stop(); stopWatch.start("统计充值"); - WalletSummaryRespDTO walletSummary = payWalletApi.getWalletSummary(beginTime, endTime); + WalletSummaryRespBO walletSummary = payWalletStatisticsService.getWalletSummary(beginTime, endTime); stopWatch.stop(); // 插入数据 TradeStatisticsDO entity = TradeStatisticsConvert.INSTANCE.convert(yesterday, orderSummary, afterSaleSummary, brokerageSettlementPrice, walletSummary); diff --git a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/api/aftersale/dto/AfterSaleSummaryRespDTO.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/bo/AfterSaleSummaryRespBO.java similarity index 72% rename from yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/api/aftersale/dto/AfterSaleSummaryRespDTO.java rename to yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/bo/AfterSaleSummaryRespBO.java index ab70019b09..985643636b 100644 --- a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/api/aftersale/dto/AfterSaleSummaryRespDTO.java +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/bo/AfterSaleSummaryRespBO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.trade.api.aftersale.dto; +package cn.iocoder.yudao.module.statistics.service.trade.bo; import lombok.Data; @@ -8,7 +8,7 @@ import lombok.Data; * @author owen */ @Data -public class AfterSaleSummaryRespDTO { +public class AfterSaleSummaryRespBO { /** * 退款订单数 diff --git a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/api/order/dto/TradeOrderSummaryRespDTO.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/bo/TradeOrderSummaryRespBO.java similarity index 70% rename from yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/api/order/dto/TradeOrderSummaryRespDTO.java rename to yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/bo/TradeOrderSummaryRespBO.java index a10d43596c..5217628468 100644 --- a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/api/order/dto/TradeOrderSummaryRespDTO.java +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/bo/TradeOrderSummaryRespBO.java @@ -1,14 +1,14 @@ -package cn.iocoder.yudao.module.trade.api.order.dto; +package cn.iocoder.yudao.module.statistics.service.trade.bo; import lombok.Data; /** - * 订单统计 Response DTO + * 订单统计 Response BO * * @author owen */ @Data -public class TradeOrderSummaryRespDTO { +public class TradeOrderSummaryRespBO { /** * 创建订单数 diff --git a/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/wallet/dto/WalletSummaryRespDTO.java b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/bo/WalletSummaryRespBO.java similarity index 85% rename from yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/wallet/dto/WalletSummaryRespDTO.java rename to yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/bo/WalletSummaryRespBO.java index c72a5de632..97e319722a 100644 --- a/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/wallet/dto/WalletSummaryRespDTO.java +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/bo/WalletSummaryRespBO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.pay.api.wallet.dto; +package cn.iocoder.yudao.module.statistics.service.trade.bo; import lombok.Data; @@ -8,7 +8,7 @@ import lombok.Data; * @author owen */ @Data -public class WalletSummaryRespDTO { +public class WalletSummaryRespBO { /** * 总支付金额(余额),单位:分 */ diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/resources/mapper/trade/AfterSaleStatisticsMapper.xml b/yudao-module-mall/yudao-module-statistics-biz/src/main/resources/mapper/trade/AfterSaleStatisticsMapper.xml new file mode 100644 index 0000000000..c89fe9ed43 --- /dev/null +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/resources/mapper/trade/AfterSaleStatisticsMapper.xml @@ -0,0 +1,12 @@ + + + + + diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/resources/mapper/trade/BrokerageStatisticsMapper.xml b/yudao-module-mall/yudao-module-statistics-biz/src/main/resources/mapper/trade/BrokerageStatisticsMapper.xml new file mode 100644 index 0000000000..ae19fcef4c --- /dev/null +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/resources/mapper/trade/BrokerageStatisticsMapper.xml @@ -0,0 +1,12 @@ + + + + + diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/resources/mapper/trade/PayWalletStatisticsMapper.xml b/yudao-module-mall/yudao-module-statistics-biz/src/main/resources/mapper/trade/PayWalletStatisticsMapper.xml new file mode 100644 index 0000000000..7a0dd1e264 --- /dev/null +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/resources/mapper/trade/PayWalletStatisticsMapper.xml @@ -0,0 +1,31 @@ + + + + + + + + + diff --git a/yudao-module-mall/yudao-module-statistics-biz/src/main/resources/mapper/trade/TradeOrderStatisticsMapper.xml b/yudao-module-mall/yudao-module-statistics-biz/src/main/resources/mapper/trade/TradeOrderStatisticsMapper.xml new file mode 100644 index 0000000000..f8553b481c --- /dev/null +++ b/yudao-module-mall/yudao-module-statistics-biz/src/main/resources/mapper/trade/TradeOrderStatisticsMapper.xml @@ -0,0 +1,16 @@ + + + + + diff --git a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/api/aftersale/TradeAfterSaleApi.java b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/api/aftersale/TradeAfterSaleApi.java index c3fd3f67bb..5f58b53930 100644 --- a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/api/aftersale/TradeAfterSaleApi.java +++ b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/api/aftersale/TradeAfterSaleApi.java @@ -1,9 +1,5 @@ package cn.iocoder.yudao.module.trade.api.aftersale; -import cn.iocoder.yudao.module.trade.api.aftersale.dto.AfterSaleSummaryRespDTO; - -import java.time.LocalDateTime; - /** * 售后 API 接口 * @@ -11,13 +7,4 @@ import java.time.LocalDateTime; */ public interface TradeAfterSaleApi { - /** - * 获取售后单统计 - * - * @param beginTime 起始时间 - * @param endTime 截止时间 - * @return 售后统计结果 - */ - AfterSaleSummaryRespDTO getAfterSaleSummary(LocalDateTime beginTime, LocalDateTime endTime); - } diff --git a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/api/brokerage/TradeBrokerageApi.java b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/api/brokerage/TradeBrokerageApi.java index 3fa51159c7..8628098a3f 100644 --- a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/api/brokerage/TradeBrokerageApi.java +++ b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/api/brokerage/TradeBrokerageApi.java @@ -1,7 +1,5 @@ package cn.iocoder.yudao.module.trade.api.brokerage; -import java.time.LocalDateTime; - /** * 分销 API 接口 * @@ -9,13 +7,4 @@ import java.time.LocalDateTime; */ public interface TradeBrokerageApi { - /** - * 获取已结算的佣金金额 - * - * @param beginTime 起始时间 - * @param endTime 截止时间 - * @return 已结算的佣金金额 - */ - Integer getBrokerageSettlementPriceSummary(LocalDateTime beginTime, LocalDateTime endTime); - } diff --git a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/api/order/TradeOrderApi.java b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/api/order/TradeOrderApi.java index 5b7594d40a..7727c3b372 100644 --- a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/api/order/TradeOrderApi.java +++ b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/api/order/TradeOrderApi.java @@ -1,9 +1,7 @@ package cn.iocoder.yudao.module.trade.api.order; import cn.iocoder.yudao.module.trade.api.order.dto.TradeOrderRespDTO; -import cn.iocoder.yudao.module.trade.api.order.dto.TradeOrderSummaryRespDTO; -import java.time.LocalDateTime; import java.util.Collection; import java.util.List; @@ -31,13 +29,4 @@ public interface TradeOrderApi { */ Integer getOrderStatus(Long id); - /** - * 获取订单统计 - * - * @param beginTime 起始时间 - * @param endTime 截止时间 - * @return 订单统计结果 - */ - TradeOrderSummaryRespDTO getOrderSummary(LocalDateTime beginTime, LocalDateTime endTime); - } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/api/aftersale/TradeAfterSaleApiImpl.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/api/aftersale/TradeAfterSaleApiImpl.java index 297e8f1ad8..474943e38c 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/api/aftersale/TradeAfterSaleApiImpl.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/api/aftersale/TradeAfterSaleApiImpl.java @@ -1,12 +1,10 @@ package cn.iocoder.yudao.module.trade.api.aftersale; -import cn.iocoder.yudao.module.trade.api.aftersale.dto.AfterSaleSummaryRespDTO; import cn.iocoder.yudao.module.trade.service.aftersale.AfterSaleService; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; import javax.annotation.Resource; -import java.time.LocalDateTime; /** * 售后 API 接口实现类 @@ -20,9 +18,4 @@ public class TradeAfterSaleApiImpl implements TradeAfterSaleApi { @Resource private AfterSaleService afterSaleService; - @Override - public AfterSaleSummaryRespDTO getAfterSaleSummary(LocalDateTime beginTime, LocalDateTime endTime) { - return afterSaleService.getAfterSaleSummary(beginTime, endTime); - } - } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/api/brokerage/TradeBrokerageApiImpl.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/api/brokerage/TradeBrokerageApiImpl.java index c93d33ef26..c860d4b7fe 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/api/brokerage/TradeBrokerageApiImpl.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/api/brokerage/TradeBrokerageApiImpl.java @@ -5,7 +5,6 @@ import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; import javax.annotation.Resource; -import java.time.LocalDateTime; /** * 订单 API 接口实现类 @@ -19,9 +18,4 @@ public class TradeBrokerageApiImpl implements TradeBrokerageApi { @Resource private BrokerageRecordService brokerageRecordService; - @Override - public Integer getBrokerageSettlementPriceSummary(LocalDateTime beginTime, LocalDateTime endTime) { - return brokerageRecordService.getBrokerageSettlementPriceSummary(beginTime, endTime); - } - } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/api/order/TradeOrderApiImpl.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/api/order/TradeOrderApiImpl.java index 5ad0cb1073..cb5b139498 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/api/order/TradeOrderApiImpl.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/api/order/TradeOrderApiImpl.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.trade.api.order; import cn.iocoder.yudao.module.trade.api.order.dto.TradeOrderRespDTO; -import cn.iocoder.yudao.module.trade.api.order.dto.TradeOrderSummaryRespDTO; import cn.iocoder.yudao.module.trade.convert.order.TradeOrderConvert; import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderDO; import cn.iocoder.yudao.module.trade.service.order.TradeOrderQueryService; @@ -9,8 +8,6 @@ import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; import javax.annotation.Resource; - -import java.time.LocalDateTime; import java.util.Collection; import java.util.List; @@ -43,9 +40,4 @@ public class TradeOrderApiImpl implements TradeOrderApi { return order.getStatus(); } - @Override - public TradeOrderSummaryRespDTO getOrderSummary(LocalDateTime beginTime, LocalDateTime endTime) { - return tradeOrderQueryService.getOrderSummary(beginTime, endTime); - } - } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/aftersale/AfterSaleMapper.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/aftersale/AfterSaleMapper.java index 5b9a222804..68a09a82a2 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/aftersale/AfterSaleMapper.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/aftersale/AfterSaleMapper.java @@ -1,19 +1,14 @@ package cn.iocoder.yudao.module.trade.dal.mysql.aftersale; -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; -import cn.iocoder.yudao.module.trade.api.aftersale.dto.AfterSaleSummaryRespDTO; import cn.iocoder.yudao.module.trade.controller.admin.aftersale.vo.AfterSalePageReqVO; import cn.iocoder.yudao.module.trade.dal.dataobject.aftersale.AfterSaleDO; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; -import com.github.yulichang.toolkit.MPJWrappers; import org.apache.ibatis.annotations.Mapper; -import java.time.LocalDateTime; import java.util.Collection; @Mapper @@ -53,12 +48,4 @@ public interface AfterSaleMapper extends BaseMapperX { .in(AfterSaleDO::getStatus, statuses)); } - default AfterSaleSummaryRespDTO selectSummaryByRefundTimeBetween(LocalDateTime beginTime, LocalDateTime endTime) { - return BeanUtil.copyProperties(CollUtil.get(selectMaps(MPJWrappers.lambdaJoin() - .selectCount(AfterSaleDO::getId, AfterSaleSummaryRespDTO::getAfterSaleCount) - .selectSum(AfterSaleDO::getRefundPrice, AfterSaleSummaryRespDTO::getAfterSaleRefundPrice) - .between(AfterSaleDO::getRefundTime, beginTime, endTime)), 0), - AfterSaleSummaryRespDTO.class); - } - } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/brokerage/BrokerageRecordMapper.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/brokerage/BrokerageRecordMapper.java index b65eb6ff05..e7a85868b6 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/brokerage/BrokerageRecordMapper.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/brokerage/BrokerageRecordMapper.java @@ -1,8 +1,6 @@ package cn.iocoder.yudao.module.trade.dal.mysql.brokerage; import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.convert.Convert; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; @@ -111,13 +109,4 @@ public interface BrokerageRecordMapper extends BaseMapperX { @Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime); - default Integer selectSummaryPriceByStatusAndUnfreezeTimeBetween(Integer bizType, Integer status, - LocalDateTime beginTime, LocalDateTime endTime) { - return Convert.toInt(CollUtil.getFirst(selectObjs(MPJWrappers.lambdaJoin() - .selectSum(BrokerageRecordDO::getPrice) - .eq(BrokerageRecordDO::getBizType, bizType) - .eq(BrokerageRecordDO::getStatus, status) - .between(BrokerageRecordDO::getUnfreezeTime, beginTime, endTime))), 0); - } - } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/order/TradeOrderMapper.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/order/TradeOrderMapper.java index d68f81c617..8dc29e8cdf 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/order/TradeOrderMapper.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/order/TradeOrderMapper.java @@ -1,16 +1,12 @@ package cn.iocoder.yudao.module.trade.dal.mysql.order; -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; -import cn.iocoder.yudao.module.trade.api.order.dto.TradeOrderSummaryRespDTO; import cn.iocoder.yudao.module.trade.controller.admin.order.vo.TradeOrderPageReqVO; import cn.iocoder.yudao.module.trade.controller.app.order.vo.AppTradeOrderPageReqVO; import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderDO; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; -import com.github.yulichang.toolkit.MPJWrappers; import org.apache.ibatis.annotations.Mapper; import java.time.LocalDateTime; @@ -93,19 +89,6 @@ public interface TradeOrderMapper extends BaseMapperX { .eq(TradeOrderDO::getSeckillActivityId, seckillActivityId)); } - default TradeOrderSummaryRespDTO selectSummaryByPayTimeBetween(LocalDateTime beginTime, LocalDateTime endTime) { - return BeanUtil.copyProperties(CollUtil.get(selectMaps(MPJWrappers.lambdaJoin() - .selectCount(TradeOrderDO::getId, TradeOrderSummaryRespDTO::getOrderPayCount) - .selectSum(TradeOrderDO::getPayPrice, TradeOrderSummaryRespDTO::getOrderPayPrice) - .between(TradeOrderDO::getPayTime, beginTime, endTime)), 0), - TradeOrderSummaryRespDTO.class); - } - - default Long selectCountByCreateTimeBetween(LocalDateTime beginTime, LocalDateTime endTime) { - return selectCount(new LambdaQueryWrapperX() - .between(TradeOrderDO::getCreateTime, beginTime, endTime)); - } - default TradeOrderDO selectOneByPickUpVerifyCode(String pickUpVerifyCode) { return selectOne(TradeOrderDO::getPickUpVerifyCode, pickUpVerifyCode); } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/aftersale/AfterSaleService.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/aftersale/AfterSaleService.java index 76c3318476..1a0c1e95d9 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/aftersale/AfterSaleService.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/aftersale/AfterSaleService.java @@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.trade.service.aftersale; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.trade.api.aftersale.dto.AfterSaleSummaryRespDTO; import cn.iocoder.yudao.module.trade.controller.admin.aftersale.vo.AfterSaleDisagreeReqVO; import cn.iocoder.yudao.module.trade.controller.admin.aftersale.vo.AfterSalePageReqVO; import cn.iocoder.yudao.module.trade.controller.admin.aftersale.vo.AfterSaleRefuseReqVO; @@ -10,8 +9,6 @@ import cn.iocoder.yudao.module.trade.controller.app.aftersale.vo.AppAfterSaleCre import cn.iocoder.yudao.module.trade.controller.app.aftersale.vo.AppAfterSaleDeliveryReqVO; import cn.iocoder.yudao.module.trade.dal.dataobject.aftersale.AfterSaleDO; -import java.time.LocalDateTime; - /** * 售后订单 Service 接口 * @@ -127,13 +124,4 @@ public interface AfterSaleService { */ Long getApplyingAfterSaleCount(Long userId); - /** - * 获取售后单统计 - * - * @param beginTime 起始时间 - * @param endTime 截止时间 - * @return 售后统计结果 - */ - AfterSaleSummaryRespDTO getAfterSaleSummary(LocalDateTime beginTime, LocalDateTime endTime); - } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/aftersale/AfterSaleServiceImpl.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/aftersale/AfterSaleServiceImpl.java index 20f93841b6..19248d1a18 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/aftersale/AfterSaleServiceImpl.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/aftersale/AfterSaleServiceImpl.java @@ -7,7 +7,6 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; import cn.iocoder.yudao.module.pay.api.refund.PayRefundApi; import cn.iocoder.yudao.module.pay.api.refund.dto.PayRefundCreateReqDTO; -import cn.iocoder.yudao.module.trade.api.aftersale.dto.AfterSaleSummaryRespDTO; import cn.iocoder.yudao.module.trade.controller.admin.aftersale.vo.AfterSaleDisagreeReqVO; import cn.iocoder.yudao.module.trade.controller.admin.aftersale.vo.AfterSalePageReqVO; import cn.iocoder.yudao.module.trade.controller.admin.aftersale.vo.AfterSaleRefuseReqVO; @@ -411,9 +410,4 @@ public class AfterSaleServiceImpl implements AfterSaleService { return tradeAfterSaleMapper.selectCountByUserIdAndStatus(userId, AfterSaleStatusEnum.APPLYING_STATUSES); } - @Override - public AfterSaleSummaryRespDTO getAfterSaleSummary(LocalDateTime beginTime, LocalDateTime endTime) { - return tradeAfterSaleMapper.selectSummaryByRefundTimeBetween(beginTime,endTime); - } - } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/brokerage/BrokerageRecordService.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/brokerage/BrokerageRecordService.java index 22c2c67acf..1cf1e24439 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/brokerage/BrokerageRecordService.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/brokerage/BrokerageRecordService.java @@ -156,13 +156,4 @@ public interface BrokerageRecordService { */ AppBrokerageProductPriceRespVO calculateProductBrokeragePrice(Long userId, Long spuId); - /** - * 获取已结算的佣金金额 - * - * @param beginTime 起始时间 - * @param endTime 截止时间 - * @return 已结算的佣金金额 - */ - Integer getBrokerageSettlementPriceSummary(LocalDateTime beginTime, LocalDateTime endTime); - } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/brokerage/BrokerageRecordServiceImpl.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/brokerage/BrokerageRecordServiceImpl.java index ace734913c..8b60c4f6a1 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/brokerage/BrokerageRecordServiceImpl.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/brokerage/BrokerageRecordServiceImpl.java @@ -356,13 +356,6 @@ public class BrokerageRecordServiceImpl implements BrokerageRecordService { return respVO; } - @Override - public Integer getBrokerageSettlementPriceSummary(LocalDateTime beginTime, LocalDateTime endTime) { - return brokerageRecordMapper.selectSummaryPriceByStatusAndUnfreezeTimeBetween( - BrokerageRecordBizTypeEnum.ORDER.getType(), BrokerageRecordStatusEnum.SETTLEMENT.getStatus(), - beginTime, endTime); - } - /** * 获得自身的代理对象,解决 AOP 生效问题 * diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderQueryService.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderQueryService.java index c2a7933e0b..1cbe025ec0 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderQueryService.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderQueryService.java @@ -1,14 +1,12 @@ package cn.iocoder.yudao.module.trade.service.order; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.trade.api.order.dto.TradeOrderSummaryRespDTO; import cn.iocoder.yudao.module.trade.controller.admin.order.vo.TradeOrderPageReqVO; import cn.iocoder.yudao.module.trade.controller.app.order.vo.AppTradeOrderPageReqVO; import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderDO; import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderItemDO; import cn.iocoder.yudao.module.trade.framework.delivery.core.client.dto.ExpressTrackRespDTO; -import java.time.LocalDateTime; import java.util.Collection; import java.util.List; @@ -95,7 +93,7 @@ public interface TradeOrderQueryService { /** * 【会员】在指定秒杀活动下,用户购买的商品数量 * - * @param userId 用户编号 + * @param userId 用户编号 * @param activityId 活动编号 * @return 秒杀商品数量 */ @@ -138,13 +136,4 @@ public interface TradeOrderQueryService { */ List getOrderItemListByOrderId(Collection orderIds); - /** - * 获取订单统计 - * - * @param beginTime 起始时间 - * @param endTime 截止时间 - * @return 订单统计结果 - */ - TradeOrderSummaryRespDTO getOrderSummary(LocalDateTime beginTime, LocalDateTime endTime); - } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderQueryServiceImpl.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderQueryServiceImpl.java index 4f4fd4f688..75e0911f6c 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderQueryServiceImpl.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderQueryServiceImpl.java @@ -6,7 +6,6 @@ import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.member.api.user.MemberUserApi; import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO; -import cn.iocoder.yudao.module.trade.api.order.dto.TradeOrderSummaryRespDTO; import cn.iocoder.yudao.module.trade.controller.admin.order.vo.TradeOrderPageReqVO; import cn.iocoder.yudao.module.trade.controller.app.order.vo.AppTradeOrderPageReqVO; import cn.iocoder.yudao.module.trade.dal.dataobject.delivery.DeliveryExpressDO; @@ -22,7 +21,6 @@ import cn.iocoder.yudao.module.trade.service.delivery.DeliveryExpressService; import org.springframework.stereotype.Service; import javax.annotation.Resource; -import java.time.LocalDateTime; import java.util.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; @@ -166,13 +164,6 @@ public class TradeOrderQueryServiceImpl implements TradeOrderQueryService { .setPhone(order.getReceiverMobile())); } - @Override - public TradeOrderSummaryRespDTO getOrderSummary(LocalDateTime beginTime, LocalDateTime endTime) { - TradeOrderSummaryRespDTO dto = tradeOrderMapper.selectSummaryByPayTimeBetween(beginTime, endTime); - dto.setOrderCreateCount(tradeOrderMapper.selectCountByCreateTimeBetween(beginTime, endTime)); - return dto; - } - // =================== Order Item =================== diff --git a/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/wallet/PayWalletApi.java b/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/wallet/PayWalletApi.java index bc6215f104..5bb50bf6d6 100644 --- a/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/wallet/PayWalletApi.java +++ b/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/wallet/PayWalletApi.java @@ -1,9 +1,5 @@ package cn.iocoder.yudao.module.pay.api.wallet; -import cn.iocoder.yudao.module.pay.api.wallet.dto.WalletSummaryRespDTO; - -import java.time.LocalDateTime; - /** * 钱包 API 接口 * @@ -11,13 +7,4 @@ import java.time.LocalDateTime; */ public interface PayWalletApi { - /** - * 获取钱包统计 - * - * @param beginTime 起始时间 - * @param endTime 截止时间 - * @return 钱包统计 - */ - WalletSummaryRespDTO getWalletSummary(LocalDateTime beginTime, LocalDateTime endTime); - } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/api/wallet/PayWalletApiImpl.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/api/wallet/PayWalletApiImpl.java index 3157d13387..89be2a25eb 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/api/wallet/PayWalletApiImpl.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/api/wallet/PayWalletApiImpl.java @@ -1,14 +1,11 @@ package cn.iocoder.yudao.module.pay.api.wallet; -import cn.iocoder.yudao.module.pay.api.wallet.dto.WalletSummaryRespDTO; -import cn.iocoder.yudao.module.pay.enums.member.PayWalletBizTypeEnum; import cn.iocoder.yudao.module.pay.service.wallet.PayWalletRechargeService; import cn.iocoder.yudao.module.pay.service.wallet.PayWalletTransactionService; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; import javax.annotation.Resource; -import java.time.LocalDateTime; /** * 钱包 API 接口实现类 @@ -24,11 +21,4 @@ public class PayWalletApiImpl implements PayWalletApi { @Resource private PayWalletTransactionService payWalletTransactionService; - @Override - public WalletSummaryRespDTO getWalletSummary(LocalDateTime beginTime, LocalDateTime endTime) { - WalletSummaryRespDTO walletSummary = payWalletRechargeService.getWalletSummary(beginTime, endTime); - walletSummary.setOrderWalletPayPrice(payWalletTransactionService.getPriceSummary(PayWalletBizTypeEnum.PAYMENT, beginTime, endTime)); - return walletSummary; - } - } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/wallet/PayWalletRechargeMapper.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/wallet/PayWalletRechargeMapper.java index 7c422a1cd4..606f614849 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/wallet/PayWalletRechargeMapper.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/wallet/PayWalletRechargeMapper.java @@ -1,17 +1,10 @@ package cn.iocoder.yudao.module.pay.dal.mysql.wallet; -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; -import cn.iocoder.yudao.module.pay.api.wallet.dto.WalletSummaryRespDTO; import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletRechargeDO; -import cn.iocoder.yudao.module.pay.enums.refund.PayRefundStatusEnum; -import com.github.yulichang.toolkit.MPJWrappers; import org.apache.ibatis.annotations.Mapper; -import java.time.LocalDateTime; - @Mapper public interface PayWalletRechargeMapper extends BaseMapperX { @@ -25,24 +18,6 @@ public interface PayWalletRechargeMapper extends BaseMapperXlambdaJoin() - .selectCount(PayWalletRechargeDO::getId, WalletSummaryRespDTO::getRechargePayCount) - .selectSum(PayWalletRechargeDO::getPayPrice, WalletSummaryRespDTO::getRechargePayPrice) - .eq(PayWalletRechargeDO::getPayStatus, true) - .between(PayWalletRechargeDO::getPayTime, beginTime, endTime)), 0), - WalletSummaryRespDTO.class); - } - - default WalletSummaryRespDTO selectRechargeSummaryByRefundTimeBetween(LocalDateTime beginTime, LocalDateTime endTime) { - return BeanUtil.copyProperties(CollUtil.get(selectMaps(MPJWrappers.lambdaJoin() - .selectCount(PayWalletRechargeDO::getId, WalletSummaryRespDTO::getRechargeRefundCount) - .selectSum(PayWalletRechargeDO::getRefundPayPrice, WalletSummaryRespDTO::getRechargeRefundPrice) - .eq(PayWalletRechargeDO::getRefundStatus, PayRefundStatusEnum.SUCCESS.getStatus()) - .between(PayWalletRechargeDO::getRefundTime, beginTime, endTime)), 0), - WalletSummaryRespDTO.class); - } - } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/wallet/PayWalletTransactionMapper.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/wallet/PayWalletTransactionMapper.java index bcb9464d65..7831e77bd7 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/wallet/PayWalletTransactionMapper.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/wallet/PayWalletTransactionMapper.java @@ -6,12 +6,9 @@ import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.pay.controller.app.wallet.vo.transaction.AppPayWalletTransactionPageReqVO; import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletTransactionDO; -import com.github.yulichang.toolkit.MPJWrappers; import org.apache.ibatis.annotations.Mapper; -import java.time.LocalDateTime; import java.util.Objects; -import java.util.Optional; @Mapper public interface PayWalletTransactionMapper extends BaseMapperX { @@ -38,15 +35,6 @@ public interface PayWalletTransactionMapper extends BaseMapperXlambdaJoin() - .selectSum(PayWalletTransactionDO::getPrice) - .eq(PayWalletTransactionDO::getBizType, type) - .between(PayWalletTransactionDO::getCreateTime, beginTime, endTime))) - .map(PayWalletTransactionDO::getPrice) - .orElse(0); - } - } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargeService.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargeService.java index 975e881a6e..3101d3ecf8 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargeService.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargeService.java @@ -1,11 +1,8 @@ package cn.iocoder.yudao.module.pay.service.wallet; -import cn.iocoder.yudao.module.pay.api.wallet.dto.WalletSummaryRespDTO; import cn.iocoder.yudao.module.pay.controller.app.wallet.vo.recharge.AppPayWalletRechargeCreateReqVO; import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletRechargeDO; -import java.time.LocalDateTime; - /** * 钱包充值 Service 接口 * @@ -16,8 +13,8 @@ public interface PayWalletRechargeService { /** * 创建钱包充值记录(发起充值) * - * @param userId 用户 id - * @param userType 用户类型 + * @param userId 用户 id + * @param userType 用户类型 * @param createReqVO 钱包充值请求 VO * @return 钱包充值记录 */ @@ -27,32 +24,25 @@ public interface PayWalletRechargeService { /** * 更新钱包充值成功 * - * @param id 钱包充值记录 id + * @param id 钱包充值记录 id * @param payOrderId 支付订单 id */ void updateWalletRechargerPaid(Long id, Long payOrderId); /** * 发起钱包充值退款 - * @param id 钱包充值编号 + * + * @param id 钱包充值编号 * @param userIp 用户 ip 地址 */ void refundWalletRecharge(Long id, String userIp); /** * 更新钱包充值记录为已退款 - * @param id 钱包充值 id + * + * @param id 钱包充值 id * @param payRefundId 退款单id */ void updateWalletRechargeRefunded(Long id, Long payRefundId); - /** - * 获取钱包统计 - * - * @param beginTime 起始时间 - * @param endTime 截止时间 - * @return 钱包统计 - */ - WalletSummaryRespDTO getWalletSummary(LocalDateTime beginTime, LocalDateTime endTime); - } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargeServiceImpl.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargeServiceImpl.java index 71c03df672..e34fa69e26 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargeServiceImpl.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargeServiceImpl.java @@ -4,7 +4,6 @@ import cn.hutool.core.lang.Assert; import cn.iocoder.yudao.framework.pay.core.enums.refund.PayRefundStatusRespEnum; import cn.iocoder.yudao.module.pay.api.order.dto.PayOrderCreateReqDTO; import cn.iocoder.yudao.module.pay.api.refund.dto.PayRefundCreateReqDTO; -import cn.iocoder.yudao.module.pay.api.wallet.dto.WalletSummaryRespDTO; import cn.iocoder.yudao.module.pay.controller.app.wallet.vo.recharge.AppPayWalletRechargeCreateReqVO; import cn.iocoder.yudao.module.pay.convert.wallet.PayWalletRechargeConvert; import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; @@ -258,15 +257,4 @@ public class PayWalletRechargeServiceImpl implements PayWalletRechargeService { return payOrder; } - @Override - public WalletSummaryRespDTO getWalletSummary(LocalDateTime beginTime, LocalDateTime endTime) { - WalletSummaryRespDTO paySummary = walletRechargeMapper.selectRechargeSummaryByPayTimeBetween(beginTime, endTime); - WalletSummaryRespDTO refundSummary = walletRechargeMapper.selectRechargeSummaryByRefundTimeBetween(beginTime, endTime); - - paySummary.setRechargeRefundCount(refundSummary.getRechargeRefundCount()); - paySummary.setRechargeRefundPrice(refundSummary.getRechargeRefundPrice()); - - return paySummary; - } - } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletService.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletService.java index 96a623bb29..5088225511 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletService.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletService.java @@ -1,12 +1,9 @@ package cn.iocoder.yudao.module.pay.service.wallet; -import cn.iocoder.yudao.module.pay.api.wallet.dto.WalletSummaryRespDTO; import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletDO; import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletTransactionDO; import cn.iocoder.yudao.module.pay.enums.member.PayWalletBizTypeEnum; -import java.time.LocalDateTime; - /** * 钱包 Service 接口 * diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletServiceImpl.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletServiceImpl.java index d98c9c9f9a..c14d20cfa4 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletServiceImpl.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletServiceImpl.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.pay.service.wallet; import cn.hutool.core.lang.Assert; -import cn.iocoder.yudao.module.pay.api.wallet.dto.WalletSummaryRespDTO; import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderExtensionDO; import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO; import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletDO; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletTransactionService.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletTransactionService.java index c970de1895..8a112b6c6c 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletTransactionService.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletTransactionService.java @@ -7,7 +7,6 @@ import cn.iocoder.yudao.module.pay.enums.member.PayWalletBizTypeEnum; import cn.iocoder.yudao.module.pay.service.wallet.bo.WalletTransactionCreateReqBO; import javax.validation.Valid; -import java.time.LocalDateTime; /** * 钱包余额流水 Service 接口 @@ -50,14 +49,4 @@ public interface PayWalletTransactionService { */ PayWalletTransactionDO getWalletTransaction(String bizId, PayWalletBizTypeEnum type); - /** - * 获取支付金额合计 - * - * @param bizType 业务类型 - * @param beginTime 开始时间 - * @param endTime 结束时间 - * @return 支付金额合计 - */ - Integer getPriceSummary(PayWalletBizTypeEnum bizType, LocalDateTime beginTime, LocalDateTime endTime); - } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletTransactionServiceImpl.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletTransactionServiceImpl.java index 85e8f6c871..ad802be410 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletTransactionServiceImpl.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletTransactionServiceImpl.java @@ -13,7 +13,6 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import javax.annotation.Resource; -import java.time.LocalDateTime; /** * 钱包流水 Service 实现类 @@ -61,9 +60,4 @@ public class PayWalletTransactionServiceImpl implements PayWalletTransactionServ return payWalletTransactionMapper.selectByBiz(bizId, type.getType()); } - @Override - public Integer getPriceSummary(PayWalletBizTypeEnum bizType, LocalDateTime beginTime, LocalDateTime endTime) { - return payWalletTransactionMapper.selectSummaryByBizTypeAndCreateTimeBetween(bizType.getType(), beginTime, endTime); - } - }