diff --git a/hai-bweb/src/main/java/com/bweb/controller/BsIntegralRebateController.java b/hai-bweb/src/main/java/com/bweb/controller/BsIntegralRebateController.java index 065857f8..4645c338 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/BsIntegralRebateController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/BsIntegralRebateController.java @@ -96,6 +96,8 @@ public class BsIntegralRebateController { if (integralRebate.getPercentage() == null || integralRebate.getType() == null || + integralRebate.getStartTime() == null || + integralRebate.getEndTime() == null || integralRebate.getProductId() == null ) { log.error("OutRechargePriceController -> insertPrice() error!"); @@ -142,6 +144,8 @@ public class BsIntegralRebateController { if (integralRebate.getPercentage() == null || integralRebate.getId() == null || + integralRebate.getStartTime() == null || + integralRebate.getEndTime() == null || integralRebate.getType() == null || integralRebate.getProductId() == null ) { diff --git a/hai-schedule/src/main/java/com/hai/schedule/HighOrderSchedule.java b/hai-schedule/src/main/java/com/hai/schedule/HighOrderSchedule.java index 8bee713f..8426151c 100644 --- a/hai-schedule/src/main/java/com/hai/schedule/HighOrderSchedule.java +++ b/hai-schedule/src/main/java/com/hai/schedule/HighOrderSchedule.java @@ -452,6 +452,7 @@ public class HighOrderSchedule { object.put("userId" , highOrder.getMemId()); object.put("orderId" , highOrder.getId()); object.put("companyId" , highOrder.getCompanyId()); + object.put("createTime" , highOrder.getCreateTime()); bsIntegralRebateService.integralRebate(object); diff --git a/hai-service/src/main/java/com/hai/config/ThirdProductConfig.java b/hai-service/src/main/java/com/hai/config/ThirdProductConfig.java index 425ae081..9c8fa9a7 100644 --- a/hai-service/src/main/java/com/hai/config/ThirdProductConfig.java +++ b/hai-service/src/main/java/com/hai/config/ThirdProductConfig.java @@ -9,9 +9,7 @@ import org.springframework.stereotype.Component; import javax.annotation.Resource; import java.math.BigDecimal; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; /** * @author hurui @@ -78,4 +76,5 @@ public class ThirdProductConfig { return object; } + } diff --git a/hai-service/src/main/java/com/hai/service/impl/BsIntegralRebateServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/BsIntegralRebateServiceImpl.java index f78abcc9..5e3ab586 100644 --- a/hai-service/src/main/java/com/hai/service/impl/BsIntegralRebateServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/BsIntegralRebateServiceImpl.java @@ -1,6 +1,7 @@ package com.hai.service.impl; import com.alibaba.fastjson.JSONObject; +import com.hai.common.utils.DateUtil; import com.hai.dao.BsIntegralRebateMapper; import com.hai.entity.BsIntegralRebate; import com.hai.entity.BsIntegralRebateExample; @@ -98,13 +99,13 @@ public class BsIntegralRebateServiceImpl implements BsIntegralRebateService { BsIntegralRebate bsIntegralRebate = findIntegralRebateByMap(map); - if (bsIntegralRebate != null) { + if (DateUtil.isEffectiveDate(object.getDate("createTime"), bsIntegralRebate.getStartTime() , bsIntegralRebate.getEndTime())) { BigDecimal integralNum = object.getBigDecimal("price").multiply(bsIntegralRebate.getPercentage()).setScale( 0, BigDecimal.ROUND_HALF_UP ); - highUserService.goldHandle(object.getLong("userId"), integralNum.intValue(), 1, 4, object.getLong("orderId") , object.getString("remark") + integralNum); } + } }