Commit fef808d88ccaf1088d15c12e3c77cc6a6e8e8d21

Authored by YunaiV
1 parent 704087ce

code review:统计代码

Showing 32 changed files with 73 additions and 181 deletions
yudao-framework/yudao-spring-boot-starter-biz-ip/src/main/java/cn/iocoder/yudao/framework/ip/core/utils/AreaUtils.java
... ... @@ -132,7 +132,9 @@ public class AreaUtils {
132 132 return convertList(areas.values(), func, area -> type.getType().equals(area.getType()));
133 133 }
134 134  
  135 + // TODO @疯狂:注释写下;
135 136 public static Integer getParentIdByType(Integer id, @NonNull AreaTypeEnum type) {
  137 + // TODO @疯狂:这种不要用 while true;因为万一脏数据,可能会死循环;可以转换成 for (int i = 0; i < Byte.MAX; i++) 一般是优先层级;
136 138 do {
137 139 Area area = AreaUtils.getArea(id);
138 140 if (area == null) {
... ...
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/infra/ApiAccessLogStatisticsMapper.java
... ... @@ -7,15 +7,17 @@ import org.apache.ibatis.annotations.Param;
7 7 import java.time.LocalDateTime;
8 8  
9 9 /**
10   - * API 访问日志统计 Mapper
  10 + * API 访问日志的统计 Mapper
11 11 *
12 12 * @author owen
13 13 */
14 14 @Mapper
15 15 public interface ApiAccessLogStatisticsMapper extends BaseMapperX<Object> {
16 16  
17   - Integer selectCountByIp(@Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime);
  17 + Integer selectCountByIp(@Param("beginTime") LocalDateTime beginTime,
  18 + @Param("endTime") LocalDateTime endTime);
18 19  
19   - Integer selectCountByUserId(@Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime);
  20 + Integer selectCountByUserId(@Param("beginTime") LocalDateTime beginTime,
  21 + @Param("endTime") LocalDateTime endTime);
20 22  
21 23 }
... ...
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/member/MemberStatisticsMapper.java
... ... @@ -10,7 +10,7 @@ import java.time.LocalDateTime;
10 10 import java.util.List;
11 11  
12 12 /**
13   - * 会员统计 Mapper
  13 + * 会员信息的统计 Mapper
14 14 *
15 15 * @author owen
16 16 */
... ... @@ -21,6 +21,7 @@ public interface MemberStatisticsMapper extends BaseMapperX&lt;Object&gt; {
21 21  
22 22 List<MemberSexStatisticsRespVO> selectSummaryListBySex();
23 23  
24   - Integer selectUserCount(@Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime);
  24 + Integer selectUserCount(@Param("beginTime") LocalDateTime beginTime,
  25 + @Param("endTime") LocalDateTime endTime);
25 26  
26 27 }
... ...
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/pay/PayWalletStatisticsMapper.java
... ... @@ -10,7 +10,7 @@ import org.apache.ibatis.annotations.Param;
10 10 import java.time.LocalDateTime;
11 11  
12 12 /**
13   - * 交易统计 Mapper
  13 + * 支付钱包的统计 Mapper
14 14 *
15 15 * @author owen
16 16 */
... ... @@ -29,6 +29,7 @@ public interface PayWalletStatisticsMapper extends BaseMapperX&lt;TradeStatisticsDO
29 29 @Param("endTime") LocalDateTime endTime,
30 30 @Param("bizType") Integer bizType);
31 31  
  32 + // TODO @疯狂:是不是搞个单独的 BO 呀;
32 33 MemberSummaryRespVO selectRechargeSummaryGroupByWalletId(@Param("beginTime") LocalDateTime beginTime,
33 34 @Param("endTime") LocalDateTime endTime,
34 35 @Param("payStatus") Boolean payStatus);
... ...
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/AfterSaleStatisticsMapper.java
... ... @@ -9,7 +9,7 @@ import org.apache.ibatis.annotations.Param;
9 9 import java.time.LocalDateTime;
10 10  
11 11 /**
12   - * 交易统计 Mapper
  12 + * 售后订单的统计 Mapper
13 13 *
14 14 * @author owen
15 15 */
... ...
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/BrokerageStatisticsMapper.java
... ... @@ -8,7 +8,7 @@ import org.apache.ibatis.annotations.Param;
8 8 import java.time.LocalDateTime;
9 9  
10 10 /**
11   - * 交易统计 Mapper
  11 + * 订单分销的统计 Mapper
12 12 *
13 13 * @author owen
14 14 */
... ...
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/TradeOrderStatisticsMapper.java
... ... @@ -10,7 +10,7 @@ import java.time.LocalDateTime;
10 10 import java.util.List;
11 11  
12 12 /**
13   - * 交易统计 Mapper
  13 + * 交易订单的统计 Mapper
14 14 *
15 15 * @author owen
16 16 */
... ...
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/TradeStatisticsMapper.java
... ... @@ -19,6 +19,7 @@ import java.util.List;
19 19 @Mapper
20 20 public interface TradeStatisticsMapper extends BaseMapperX<TradeStatisticsDO> {
21 21  
  22 + // TODO @疯狂:这个要不要也挪到 xml 里,保持统一?
22 23 @Select("SELECT IFNULL(SUM(order_create_count), 0) AS count, IFNULL(SUM(order_pay_price), 0) AS summary " +
23 24 "FROM trade_statistics " +
24 25 "WHERE time BETWEEN #{beginTime} AND #{endTime} AND deleted = FALSE")
... ... @@ -33,4 +34,5 @@ public interface TradeStatisticsMapper extends BaseMapperX&lt;TradeStatisticsDO&gt; {
33 34  
34 35 Integer selectExpensePriceByTimeBetween(@Param("beginTime") LocalDateTime beginTime,
35 36 @Param("endTime") LocalDateTime endTime);
  37 +
36 38 }
... ...
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/infra/ApiAccessLogStatisticsService.java
... ... @@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.statistics.service.infra;
3 3 import java.time.LocalDateTime;
4 4  
5 5 /**
6   - * API 访问日志统计 Service 接口
  6 + * API 访问日志的统计 Service 接口
7 7 *
8 8 * @author owen
9 9 */
... ...
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/infra/ApiAccessLogStatisticsServiceImpl.java
... ... @@ -8,7 +8,7 @@ import javax.annotation.Resource;
8 8 import java.time.LocalDateTime;
9 9  
10 10 /**
11   - * API 访问日志统计 Service 实现类
  11 + * API 访问日志的统计 Service 实现类
12 12 *
13 13 * @author owen
14 14 */
... ...
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/member/MemberStatisticsService.java
... ... @@ -9,7 +9,7 @@ import java.time.LocalDateTime;
9 9 import java.util.List;
10 10  
11 11 /**
12   - * 会员统计 Service 接口
  12 + * 会员信息的统计 Service 接口
13 13 *
14 14 * @author owen
15 15 */
... ...
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/member/MemberStatisticsServiceImpl.java
... ... @@ -24,7 +24,7 @@ import java.util.Optional;
24 24 import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap;
25 25  
26 26 /**
27   - * 会员统计 Service 实现类
  27 + * 会员信息的统计 Service 实现类
28 28 *
29 29 * @author owen
30 30 */
... ...
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/pay/PayWalletStatisticsService.java
... ... @@ -6,7 +6,7 @@ import cn.iocoder.yudao.module.statistics.service.trade.bo.WalletSummaryRespBO;
6 6 import java.time.LocalDateTime;
7 7  
8 8 /**
9   - * 钱包统计 Service 接口
  9 + * 钱包的统计 Service 接口
10 10 *
11 11 * @author owen
12 12 */
... ...
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/pay/PayWalletStatisticsServiceImpl.java
... ... @@ -12,7 +12,7 @@ import javax.annotation.Resource;
12 12 import java.time.LocalDateTime;
13 13  
14 14 /**
15   - * 钱包统计 Service 实现类
  15 + * 钱包的统计 Service 实现类
16 16 *
17 17 * @author owen
18 18 */
... ... @@ -31,11 +31,10 @@ public class PayWalletStatisticsServiceImpl implements PayWalletStatisticsServic
31 31 beginTime, endTime, PayRefundStatusEnum.SUCCESS.getStatus());
32 32 Integer walletPayPrice = payWalletStatisticsMapper.selectPriceSummaryByBizTypeAndCreateTimeBetween(
33 33 beginTime, endTime, PayWalletBizTypeEnum.PAYMENT.getType());
34   -
35   - paySummary.setOrderWalletPayPrice(walletPayPrice);
36   - paySummary.setRechargeRefundCount(refundSummary.getRechargeRefundCount());
37   - paySummary.setRechargeRefundPrice(refundSummary.getRechargeRefundPrice());
38   -
  34 + // 拼接
  35 + paySummary.setOrderWalletPayPrice(walletPayPrice)
  36 + .setRechargeRefundCount(refundSummary.getRechargeRefundCount())
  37 + .setRechargeRefundPrice(refundSummary.getRechargeRefundPrice());
39 38 return paySummary;
40 39 }
41 40  
... ...
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/TradeOrderStatisticsService.java
... ... @@ -7,7 +7,7 @@ import java.time.LocalDateTime;
7 7 import java.util.List;
8 8  
9 9 /**
10   - * 交易订单统计 Service 接口
  10 + * 交易订单的统计 Service 接口
11 11 *
12 12 * @author owen
13 13 */
... ...
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/TradeStatisticsServiceImpl.java
... ... @@ -45,16 +45,15 @@ public class TradeStatisticsServiceImpl implements TradeStatisticsService {
45 45  
46 46 @Override
47 47 public TradeStatisticsComparisonRespVO<TradeSummaryRespVO> getTradeSummaryComparison() {
48   - // 昨天的数据
  48 + // 1.1 昨天的数据
49 49 TradeSummaryRespBO yesterdayData = getTradeSummaryByDays(-1);
50   - // 前天的数据(用于对照昨天的数据)
  50 + // 1.2 前天的数据(用于对照昨天的数据)
51 51 TradeSummaryRespBO beforeYesterdayData = getTradeSummaryByDays(-2);
52   -
53   - // 本月数据;
  52 + // 2.1 本月数据
54 53 TradeSummaryRespBO monthData = getTradeSummaryByMonths(0);
55   - // 上月数据(用于对照本月的数据)
  54 + // 2.2 上月数据(用于对照本月的数据)
56 55 TradeSummaryRespBO lastMonthData = getTradeSummaryByMonths(-1);
57   -
  56 + // 转换返回
58 57 return TradeStatisticsConvert.INSTANCE.convert(yesterdayData, beforeYesterdayData, monthData, lastMonthData);
59 58 }
60 59  
... ... @@ -81,31 +80,31 @@ public class TradeStatisticsServiceImpl implements TradeStatisticsService {
81 80  
82 81 @Override
83 82 public String statisticsYesterdayTrade() {
84   - // 处理统计参数
85 83 LocalDateTime yesterday = LocalDateTime.now().minusDays(1);
86 84 LocalDateTime beginTime = LocalDateTimeUtil.beginOfDay(yesterday);
87 85 LocalDateTime endTime = LocalDateTimeUtil.endOfDay(yesterday);
88   - // 统计
  86 + // 1.1 统计订单
89 87 StopWatch stopWatch = new StopWatch("交易统计");
90 88 stopWatch.start("统计订单");
91 89 TradeOrderSummaryRespBO orderSummary = tradeOrderStatisticsService.getOrderSummary(beginTime, endTime);
92 90 stopWatch.stop();
93   -
  91 + // 1.2 统计售后
94 92 stopWatch.start("统计售后");
95 93 AfterSaleSummaryRespBO afterSaleSummary = afterSaleStatisticsService.getAfterSaleSummary(beginTime, endTime);
96 94 stopWatch.stop();
97   -
  95 + // 1.3 统计佣金
98 96 stopWatch.start("统计佣金");
99 97 Integer brokerageSettlementPrice = brokerageStatisticsService.getBrokerageSettlementPriceSummary(beginTime, endTime);
100 98 stopWatch.stop();
101   -
  99 + // 1.4 统计充值
102 100 stopWatch.start("统计充值");
103 101 WalletSummaryRespBO walletSummary = payWalletStatisticsService.getWalletSummary(beginTime, endTime);
104 102 stopWatch.stop();
105   - // 插入数据
106   - TradeStatisticsDO entity = TradeStatisticsConvert.INSTANCE.convert(yesterday, orderSummary, afterSaleSummary, brokerageSettlementPrice, walletSummary);
  103 +
  104 + // 2. 插入数据
  105 + TradeStatisticsDO entity = TradeStatisticsConvert.INSTANCE.convert(yesterday, orderSummary, afterSaleSummary,
  106 + brokerageSettlementPrice, walletSummary);
107 107 tradeStatisticsMapper.insert(entity);
108   - // 返回计时结果
109 108 return stopWatch.prettyPrint();
110 109 }
111 110  
... ...
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/bo/WalletSummaryRespBO.java
... ... @@ -9,6 +9,7 @@ import lombok.Data;
9 9 */
10 10 @Data
11 11 public class WalletSummaryRespBO {
  12 +
12 13 /**
13 14 * 总支付金额(余额),单位:分
14 15 */
... ...
yudao-module-mall/yudao-module-statistics-biz/src/main/resources/mapper/infra/ApiAccessLogStatisticsMapper.xml
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3 <mapper namespace="cn.iocoder.yudao.module.statistics.dal.mysql.infra.ApiAccessLogStatisticsMapper">
  4 +
4 5 <select id="selectCountByIp" resultType="java.lang.Integer">
5 6 SELECT COUNT(1)
6 7 FROM infra_api_access_log
7   - WHERE deleted = FALSE
8   - AND create_time BETWEEN #{beginTime} AND #{endTime}
  8 + WHERE create_time BETWEEN #{beginTime} AND #{endTime}
  9 + AND deleted = FALSE
9 10 GROUP BY user_ip
10 11 </select>
11 12  
12 13 <select id="selectCountByUserId" resultType="java.lang.Integer">
13 14 SELECT COUNT(1)
14 15 FROM infra_api_access_log
15   - WHERE user_id != 0
16   - AND deleted = FALSE
  16 + WHERE user_id > 0
17 17 AND create_time BETWEEN #{beginTime} AND #{endTime}
  18 + AND deleted = FALSE
18 19 GROUP BY user_id
19 20 </select>
  21 +
20 22 </mapper>
... ...
yudao-module-mall/yudao-module-statistics-biz/src/main/resources/mapper/member/MemberStatisticsMapper.xml
... ... @@ -8,6 +8,7 @@
8 8 FROM member_user
9 9 WHERE deleted = FALSE
10 10 GROUP BY area_id
  11 + <!-- TODO @疯狂:order by 是不是交给内存哈 -->
11 12 ORDER BY userCount DESC
12 13 </select>
13 14  
... ... @@ -17,6 +18,7 @@
17 18 FROM member_user
18 19 WHERE deleted = FALSE
19 20 GROUP BY sex
  21 + <!-- TODO @疯狂:order by 是不是交给内存哈 -->
20 22 ORDER BY userCount DESC
21 23 </select>
22 24  
... ... @@ -31,4 +33,5 @@
31 33 AND create_time &lt;= #{endTime}
32 34 </if>
33 35 </select>
34   -</mapper>
35 36 \ No newline at end of file
  37 +
  38 +</mapper>
... ...
yudao-module-mall/yudao-module-statistics-biz/src/main/resources/mapper/pay/PayWalletStatisticsMapper.xml
... ... @@ -7,8 +7,8 @@
7 7 SUM(pay_price) AS rechargePayPrice
8 8 FROM pay_wallet_recharge
9 9 WHERE pay_status = #{payStatus}
10   - AND deleted = FALSE
11 10 AND pay_time BETWEEN #{beginTime} AND #{endTime}
  11 + AND deleted = FALSE
12 12 </select>
13 13  
14 14 <select id="selectRechargeSummaryByRefundTimeBetween"
... ... @@ -17,16 +17,16 @@
17 17 SUM(pay_price) AS rechargeRefundPrice
18 18 FROM pay_wallet_recharge
19 19 WHERE refund_status = #{refundStatus}
20   - AND deleted = FALSE
21 20 AND refund_time BETWEEN #{beginTime} AND #{endTime}
  21 + AND deleted = FALSE
22 22 </select>
23 23  
24 24 <select id="selectPriceSummaryByBizTypeAndCreateTimeBetween" resultType="java.lang.Integer">
25 25 SELECT SUM(price)
26 26 FROM pay_wallet_transaction
27 27 WHERE biz_type = #{bizType}
28   - AND deleted = FALSE
29 28 AND create_time BETWEEN #{beginTime} AND #{endTime}
  29 + AND deleted = FALSE
30 30 </select>
31 31  
32 32 <select id="selectRechargeSummaryGroupByWalletId"
... ... @@ -35,13 +35,14 @@
35 35 SUM(pay_price) AS rechargePrice
36 36 FROM pay_wallet_recharge
37 37 WHERE pay_status = #{payStatus}
38   - AND deleted = FALSE
39 38 <if test="beginTime != null">
40 39 AND pay_time >= #{beginTime}
41 40 </if>
42 41 <if test="endTime != null">
43 42 AND pay_time &lt;= #{endTime}
44 43 </if>
  44 + AND deleted = FALSE
45 45 GROUP BY wallet_id
46 46 </select>
  47 +
47 48 </mapper>
... ...
yudao-module-mall/yudao-module-statistics-biz/src/main/resources/mapper/trade/AfterSaleStatisticsMapper.xml
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3 <mapper namespace="cn.iocoder.yudao.module.statistics.dal.mysql.trade.AfterSaleStatisticsMapper">
  4 +
4 5 <select id="selectSummaryByRefundTimeBetween"
5 6 resultType="cn.iocoder.yudao.module.statistics.service.trade.bo.AfterSaleSummaryRespBO">
6 7 SELECT COUNT(1) AS afterSaleCount,
7 8 SUM(refund_price) AS afterSaleRefundPrice
8 9 FROM trade_after_sale
9   - WHERE deleted = FALSE
10   - AND refund_time BETWEEN #{beginTime} AND #{endTime}
  10 + WHERE refund_time BETWEEN #{beginTime} AND #{endTime}
  11 + AND deleted = FALSE
11 12 </select>
  13 +
12 14 </mapper>
... ...
yudao-module-mall/yudao-module-statistics-biz/src/main/resources/mapper/trade/BrokerageStatisticsMapper.xml
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3 <mapper namespace="cn.iocoder.yudao.module.statistics.dal.mysql.trade.BrokerageStatisticsMapper">
  4 +
4 5 <select id="selectSummaryPriceByStatusAndUnfreezeTimeBetween" resultType="java.lang.Integer">
5 6 SELECT SUM(price)
6 7 FROM trade_brokerage_record
7 8 WHERE biz_type = #{bizType}
8 9 AND status = #{status}
9   - AND deleted = FALSE
10 10 AND unfreeze_time BETWEEN #{beginTime} AND #{endTime}
  11 + AND deleted = FALSE
11 12 </select>
  13 +
12 14 </mapper>
... ...
yudao-module-mall/yudao-module-statistics-biz/src/main/resources/mapper/trade/TradeOrderStatisticsMapper.xml
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3 <mapper namespace="cn.iocoder.yudao.module.statistics.dal.mysql.trade.TradeOrderStatisticsMapper">
  4 +
4 5 <select id="selectSummaryListByAreaId"
5 6 resultType="cn.iocoder.yudao.module.statistics.controller.admin.member.vo.MemberAreaStatisticsRespVO">
6 7 SELECT receiver_area_id AS areaId,
... ... @@ -33,25 +34,25 @@
33 34 <select id="selectUserCountByPayTimeBetween" resultType="java.lang.Integer">
34 35 SELECT COUNT(1)
35 36 FROM trade_order
36   - WHERE deleted = FALSE
  37 + WHERE pay_time BETWEEN #{beginTime} AND #{endTime}
37 38 AND pay_status = TRUE
38   - AND pay_time BETWEEN #{beginTime} AND #{endTime}
  39 + AND deleted = FALSE
39 40 GROUP BY user_id
40 41 </select>
41 42  
42 43 <select id="selectCountByCreateTimeBetween" resultType="java.lang.Integer">
43 44 SELECT COUNT(1)
44 45 FROM trade_order
45   - WHERE deleted = FALSE
46   - AND create_time BETWEEN #{beginTime} AND #{endTime}
  46 + WHERE create_time BETWEEN #{beginTime} AND #{endTime}
  47 + AND deleted = FALSE
47 48 </select>
48 49  
49 50 <select id="selectCountByPayTimeBetween" resultType="java.lang.Integer">
50 51 SELECT COUNT(1)
51 52 FROM trade_order
52 53 WHERE pay_status = TRUE
53   - AND deleted = FALSE
54 54 AND create_time BETWEEN #{beginTime} AND #{endTime}
  55 + AND deleted = FALSE
55 56 </select>
56 57  
57 58 <select id="selectSummaryPriceByPayTimeBetween" resultType="java.lang.Integer">
... ... @@ -61,4 +62,5 @@
61 62 AND deleted = FALSE
62 63 AND create_time BETWEEN #{beginTime} AND #{endTime}
63 64 </select>
  65 +
64 66 </mapper>
... ...
yudao-module-mall/yudao-module-statistics-biz/src/main/resources/mapper/trade/TradeStatisticsMapper.xml
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3 <mapper namespace="cn.iocoder.yudao.module.statistics.dal.mysql.trade.TradeStatisticsMapper">
  4 +
4 5 <select id="selectByTimeBetween"
5 6 resultType="cn.iocoder.yudao.module.statistics.controller.admin.trade.vo.TradeTrendSummaryRespVO">
6 7 SELECT
... ... @@ -48,4 +49,5 @@
48 49 AND time &lt;= #{endTime}
49 50 </if>
50 51 </select>
  52 +
51 53 </mapper>
... ...
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/api/aftersale/TradeAfterSaleApi.java deleted
1   -package cn.iocoder.yudao.module.trade.api.aftersale;
2   -
3   -/**
4   - * 售后 API 接口
5   - *
6   - * @author owen
7   - */
8   -public interface TradeAfterSaleApi {
9   -
10   -}
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/api/brokerage/TradeBrokerageApi.java deleted
1   -package cn.iocoder.yudao.module.trade.api.brokerage;
2   -
3   -/**
4   - * 分销 API 接口
5   - *
6   - * @author owen
7   - */
8   -public interface TradeBrokerageApi {
9   -
10   -}
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/api/order/TradeOrderApi.java
... ... @@ -28,25 +28,6 @@ public interface TradeOrderApi {
28 28 */
29 29 TradeOrderRespDTO getOrder(Long id);
30 30  
31   - /**
32   - * 获取订单统计
33   - *
34   - * @param beginTime 起始时间
35   - * @param endTime 截止时间
36   - * @return 订单统计结果
37   - */
38   - TradeOrderSummaryRespDTO getOrderSummary(LocalDateTime beginTime, LocalDateTime endTime);
39   -
40   - /**
41   - * 更新拼团相关信息到订单
42   - *
43   - * @param orderId 订单编号
44   - * @param activityId 拼团活动编号
45   - * @param combinationRecordId 拼团记录编号
46   - * @param headId 团长编号
47   - */
48   - void updateOrderCombinationInfo(Long orderId, Long activityId, Long combinationRecordId, Long headId);
49   -
50 31 // TODO 芋艿:需要优化下;
51 32 /**
52 33 * 取消支付订单
... ...
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/api/aftersale/TradeAfterSaleApiImpl.java deleted
1   -package cn.iocoder.yudao.module.trade.api.aftersale;
2   -
3   -import cn.iocoder.yudao.module.trade.service.aftersale.AfterSaleService;
4   -import org.springframework.stereotype.Service;
5   -import org.springframework.validation.annotation.Validated;
6   -
7   -import javax.annotation.Resource;
8   -
9   -/**
10   - * 售后 API 接口实现类
11   - *
12   - * @author owen
13   - */
14   -@Service
15   -@Validated
16   -public class TradeAfterSaleApiImpl implements TradeAfterSaleApi {
17   -
18   - @Resource
19   - private AfterSaleService afterSaleService;
20   -
21   -}
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/api/brokerage/TradeBrokerageApiImpl.java deleted
1   -package cn.iocoder.yudao.module.trade.api.brokerage;
2   -
3   -import cn.iocoder.yudao.module.trade.service.brokerage.BrokerageRecordService;
4   -import org.springframework.stereotype.Service;
5   -import org.springframework.validation.annotation.Validated;
6   -
7   -import javax.annotation.Resource;
8   -
9   -/**
10   - * 订单 API 接口实现类
11   - *
12   - * @author HUIHUI
13   - */
14   -@Service
15   -@Validated
16   -public class TradeBrokerageApiImpl implements TradeBrokerageApi {
17   -
18   - @Resource
19   - private BrokerageRecordService brokerageRecordService;
20   -
21   -}
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/api/order/TradeOrderApiImpl.java
... ... @@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.trade.api.order;
2 2  
3 3 import cn.iocoder.yudao.module.trade.api.order.dto.TradeOrderRespDTO;
4 4 import cn.iocoder.yudao.module.trade.convert.order.TradeOrderConvert;
5   -import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderDO;
6 5 import cn.iocoder.yudao.module.trade.service.order.TradeOrderQueryService;
7 6 import cn.iocoder.yudao.module.trade.service.order.TradeOrderUpdateService;
8 7 import org.springframework.stereotype.Service;
... ... @@ -12,9 +11,6 @@ import javax.annotation.Resource;
12 11 import java.util.Collection;
13 12 import java.util.List;
14 13  
15   -import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
16   -import static cn.iocoder.yudao.module.trade.enums.ErrorCodeConstants.ORDER_NOT_FOUND;
17   -
18 14 /**
19 15 * 订单 API 接口实现类
20 16 *
... ... @@ -40,16 +36,6 @@ public class TradeOrderApiImpl implements TradeOrderApi {
40 36 }
41 37  
42 38 @Override
43   - public TradeOrderSummaryRespDTO getOrderSummary(LocalDateTime beginTime, LocalDateTime endTime) {
44   - return tradeOrderQueryService.getOrderSummary(beginTime, endTime);
45   - }
46   -
47   - @Override
48   - public void updateOrderCombinationInfo(Long orderId, Long activityId, Long combinationRecordId, Long headId) {
49   - tradeOrderUpdateService.updateOrderCombinationInfo(orderId, activityId, combinationRecordId, headId);
50   - }
51   -
52   - @Override
53 39 public void cancelPaidOrder(Long userId, Long orderId) {
54 40 tradeOrderUpdateService.cancelPaidOrder(userId, orderId);
55 41 }
... ...
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/api/wallet/PayWalletApi.java deleted
1   -package cn.iocoder.yudao.module.pay.api.wallet;
2   -
3   -/**
4   - * 钱包 API 接口
5   - *
6   - * @author owen
7   - */
8   -public interface PayWalletApi {
9   -
10   -}
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/api/wallet/PayWalletApiImpl.java deleted
1   -package cn.iocoder.yudao.module.pay.api.wallet;
2   -
3   -import cn.iocoder.yudao.module.pay.service.wallet.PayWalletRechargeService;
4   -import cn.iocoder.yudao.module.pay.service.wallet.PayWalletTransactionService;
5   -import org.springframework.stereotype.Service;
6   -import org.springframework.validation.annotation.Validated;
7   -
8   -import javax.annotation.Resource;
9   -
10   -/**
11   - * 钱包 API 接口实现类
12   - *
13   - * @author owen
14   - */
15   -@Service
16   -@Validated
17   -public class PayWalletApiImpl implements PayWalletApi {
18   -
19   - @Resource
20   - private PayWalletRechargeService payWalletRechargeService;
21   - @Resource
22   - private PayWalletTransactionService payWalletTransactionService;
23   -
24   -}