Authored by wujiexiang

Merge branch 'hotfix-PlatformServiceFee' into test6.9.22

@@ -50,7 +50,7 @@ public class SellerPlatformServiceFeeSupport { @@ -50,7 +50,7 @@ public class SellerPlatformServiceFeeSupport {
50 SellerOrderStatsEntry currentStatsEntry = SellerOrderStatsEntry.builder() 50 SellerOrderStatsEntry currentStatsEntry = SellerOrderStatsEntry.builder()
51 .sellerUid(uid) 51 .sellerUid(uid)
52 .skupType(skupType) 52 .skupType(skupType)
53 - .time(com.yohoufo.common.utils.DateUtil.getCurrentTimeSecond()) 53 + .time(DateUtil.getCurrentTimeSecond())
54 .bidType(OrderConstant.NON_LIMIT_BID_TYPE) 54 .bidType(OrderConstant.NON_LIMIT_BID_TYPE)
55 .build(); 55 .build();
56 SellerOrderStatsConfiguration currentStatsConfig = statsConfigurationManager.getStatsConfig(currentStatsEntry); 56 SellerOrderStatsConfiguration currentStatsConfig = statsConfigurationManager.getStatsConfig(currentStatsEntry);
@@ -96,12 +96,25 @@ public class SellerPlatformServiceFeeSupport { @@ -96,12 +96,25 @@ public class SellerPlatformServiceFeeSupport {
96 public BigDecimal getPlatformServiceFeeRate(int uid, SkupType skupType) { 96 public BigDecimal getPlatformServiceFeeRate(int uid, SkupType skupType) {
97 logger.info("[{}] in platformServiceFeeRate,skupType:{}", uid, skupType); 97 logger.info("[{}] in platformServiceFeeRate,skupType:{}", uid, skupType);
98 98
  99 + BigDecimal feeRate = null;
99 //查询当前周期的费用 100 //查询当前周期的费用
100 - SellerPlatformServiceFee sellerPlatformServiceFee = currentPeriod(uid, skupType);  
101 -  
102 - //3.最终的费用  
103 - BigDecimal feeRate = sellerPlatformServiceFee.getFeeRate();  
104 - 101 + //当前的扣点服务
  102 + SellerOrderStatsEntry currentStatsEntry = SellerOrderStatsEntry.builder()
  103 + .sellerUid(uid)
  104 + .skupType(skupType)
  105 + .time(com.yohoufo.common.utils.DateUtil.getCurrentTimeSecond())
  106 + .bidType(OrderConstant.NON_LIMIT_BID_TYPE)
  107 + .build();
  108 + SellerOrderStatsConfiguration currentStatsConfig = statsConfigurationManager.getStatsConfig(currentStatsEntry);
  109 + //若当前查询的配置为空配置,返回null
  110 + if (currentStatsConfig != SellerOrderStatsConfiguration.emptyConfiguration) {
  111 + SellerOrderStatsResult statsResult = (SellerOrderStatsResult) statsConfigurationManager.getStatsProcessor(currentStatsConfig.getStatsProcessorName()).getResult(currentStatsEntry, currentStatsConfig);
  112 + if (Objects.isNull(statsResult)) {
  113 + statsResult = createEmptyStatsResult(uid, currentStatsConfig.getStatsCode());
  114 + }
  115 + //3.最终费率
  116 + feeRate = this.buildSellerPlatformServiceFee(uid, statsResult).getFeeRate();
  117 + }
105 logger.info("[{}] out platformServiceFeeRate:{}", uid, feeRate); 118 logger.info("[{}] out platformServiceFeeRate:{}", uid, feeRate);
106 return feeRate; 119 return feeRate;
107 } 120 }