Showing
1 changed file
with
12 additions
and
2 deletions
@@ -2,6 +2,7 @@ package com.yohoufo.order.service.support; | @@ -2,6 +2,7 @@ package com.yohoufo.order.service.support; | ||
2 | 2 | ||
3 | import com.yoho.core.common.utils.DateUtil; | 3 | import com.yoho.core.common.utils.DateUtil; |
4 | import com.yohobuy.ufo.model.order.common.EntrySellerType; | 4 | import com.yohobuy.ufo.model.order.common.EntrySellerType; |
5 | +import com.yohobuy.ufo.model.order.constants.OrderConstant; | ||
5 | import com.yohobuy.ufo.model.order.constants.SkupType; | 6 | import com.yohobuy.ufo.model.order.constants.SkupType; |
6 | import com.yohoufo.dal.order.model.SellerOrderStatsResult; | 7 | import com.yohoufo.dal.order.model.SellerOrderStatsResult; |
7 | import com.yohoufo.order.model.bo.PlatformServiceFeeDefinition; | 8 | import com.yohoufo.order.model.bo.PlatformServiceFeeDefinition; |
@@ -46,7 +47,12 @@ public class SellerPlatformServiceFeeSupport { | @@ -46,7 +47,12 @@ public class SellerPlatformServiceFeeSupport { | ||
46 | */ | 47 | */ |
47 | public SellerPlatformServiceFee currentPeriod(int uid, SkupType skupType) { | 48 | public SellerPlatformServiceFee currentPeriod(int uid, SkupType skupType) { |
48 | //当前的扣点服务 | 49 | //当前的扣点服务 |
49 | - SellerOrderStatsEntry currentStatsEntry = SellerOrderStatsEntry.builder().sellerUid(uid).skupType(skupType).time(com.yohoufo.common.utils.DateUtil.getCurrentTimeSecond()).build(); | 50 | + SellerOrderStatsEntry currentStatsEntry = SellerOrderStatsEntry.builder() |
51 | + .sellerUid(uid) | ||
52 | + .skupType(skupType) | ||
53 | + .time(com.yohoufo.common.utils.DateUtil.getCurrentTimeSecond()) | ||
54 | + .bidType(OrderConstant.NON_LIMIT_BID_TYPE) | ||
55 | + .build(); | ||
50 | SellerOrderStatsConfiguration currentStatsConfig = statsConfigurationManager.getStatsConfig(currentStatsEntry); | 56 | SellerOrderStatsConfiguration currentStatsConfig = statsConfigurationManager.getStatsConfig(currentStatsEntry); |
51 | SellerOrderStatsResult statsResult = (SellerOrderStatsResult) statsConfigurationManager.getStatsProcessor(currentStatsConfig.getStatsProcessorName()).getResult(currentStatsEntry, currentStatsConfig); | 57 | SellerOrderStatsResult statsResult = (SellerOrderStatsResult) statsConfigurationManager.getStatsProcessor(currentStatsConfig.getStatsProcessorName()).getResult(currentStatsEntry, currentStatsConfig); |
52 | if (Objects.isNull(statsResult)) { | 58 | if (Objects.isNull(statsResult)) { |
@@ -64,7 +70,11 @@ public class SellerPlatformServiceFeeSupport { | @@ -64,7 +70,11 @@ public class SellerPlatformServiceFeeSupport { | ||
64 | */ | 70 | */ |
65 | public SellerPlatformServiceFee nextPeriod(int uid, SkupType skupType) { | 71 | public SellerPlatformServiceFee nextPeriod(int uid, SkupType skupType) { |
66 | //下个周期 | 72 | //下个周期 |
67 | - SellerOrderStatsEntry nextStatsEntry = SellerOrderStatsEntry.builder().sellerUid(uid).skupType(skupType).build(); | 73 | + SellerOrderStatsEntry nextStatsEntry = SellerOrderStatsEntry.builder() |
74 | + .sellerUid(uid) | ||
75 | + .skupType(skupType) | ||
76 | + .bidType(OrderConstant.NON_LIMIT_BID_TYPE) | ||
77 | + .build(); | ||
68 | SellerOrderStatsConfiguration nextStatsConfig = statsConfigurationManager.getStatsConfig(nextStatsEntry); | 78 | SellerOrderStatsConfiguration nextStatsConfig = statsConfigurationManager.getStatsConfig(nextStatsEntry); |
69 | //设置查询时间为下个周期的开始时间 | 79 | //设置查询时间为下个周期的开始时间 |
70 | nextStatsEntry.setTime(nextStatsConfig.getStatsUnit().nextPeriodTimeTuple(nextStatsConfig.getStatsPeriod(), nextStatsConfig.getStatsPeriod()).getKey()); | 80 | nextStatsEntry.setTime(nextStatsConfig.getStatsUnit().nextPeriodTimeTuple(nextStatsConfig.getStatsPeriod(), nextStatsConfig.getStatsPeriod()).getKey()); |
-
Please register or login to post a comment