Authored by LUOXC

fixbug

... ... @@ -2,6 +2,7 @@ package com.yohoufo.order.service.support;
import com.yoho.core.common.utils.DateUtil;
import com.yohobuy.ufo.model.order.common.EntrySellerType;
import com.yohobuy.ufo.model.order.constants.OrderConstant;
import com.yohobuy.ufo.model.order.constants.SkupType;
import com.yohoufo.dal.order.model.SellerOrderStatsResult;
import com.yohoufo.order.model.bo.PlatformServiceFeeDefinition;
... ... @@ -46,7 +47,12 @@ public class SellerPlatformServiceFeeSupport {
*/
public SellerPlatformServiceFee currentPeriod(int uid, SkupType skupType) {
//当前的扣点服务
SellerOrderStatsEntry currentStatsEntry = SellerOrderStatsEntry.builder().sellerUid(uid).skupType(skupType).time(com.yohoufo.common.utils.DateUtil.getCurrentTimeSecond()).build();
SellerOrderStatsEntry currentStatsEntry = SellerOrderStatsEntry.builder()
.sellerUid(uid)
.skupType(skupType)
.time(com.yohoufo.common.utils.DateUtil.getCurrentTimeSecond())
.bidType(OrderConstant.NON_LIMIT_BID_TYPE)
.build();
SellerOrderStatsConfiguration currentStatsConfig = statsConfigurationManager.getStatsConfig(currentStatsEntry);
SellerOrderStatsResult statsResult = (SellerOrderStatsResult) statsConfigurationManager.getStatsProcessor(currentStatsConfig.getStatsProcessorName()).getResult(currentStatsEntry, currentStatsConfig);
if (Objects.isNull(statsResult)) {
... ... @@ -64,7 +70,11 @@ public class SellerPlatformServiceFeeSupport {
*/
public SellerPlatformServiceFee nextPeriod(int uid, SkupType skupType) {
//下个周期
SellerOrderStatsEntry nextStatsEntry = SellerOrderStatsEntry.builder().sellerUid(uid).skupType(skupType).build();
SellerOrderStatsEntry nextStatsEntry = SellerOrderStatsEntry.builder()
.sellerUid(uid)
.skupType(skupType)
.bidType(OrderConstant.NON_LIMIT_BID_TYPE)
.build();
SellerOrderStatsConfiguration nextStatsConfig = statsConfigurationManager.getStatsConfig(nextStatsEntry);
//设置查询时间为下个周期的开始时间
nextStatsEntry.setTime(nextStatsConfig.getStatsUnit().nextPeriodTimeTuple(nextStatsConfig.getStatsPeriod(), nextStatsConfig.getStatsPeriod()).getKey());
... ...