修改话费定时任务问题

dev-discount
袁野 2 years ago
parent c279cfff85
commit 8f415a97f3
  1. 4
      hai-bweb/src/main/java/com/bweb/controller/BsIntegralRebateController.java
  2. 1
      hai-schedule/src/main/java/com/hai/schedule/HighOrderSchedule.java
  3. 5
      hai-service/src/main/java/com/hai/config/ThirdProductConfig.java
  4. 5
      hai-service/src/main/java/com/hai/service/impl/BsIntegralRebateServiceImpl.java

@ -96,6 +96,8 @@ public class BsIntegralRebateController {
if (integralRebate.getPercentage() == null || if (integralRebate.getPercentage() == null ||
integralRebate.getType() == null || integralRebate.getType() == null ||
integralRebate.getStartTime() == null ||
integralRebate.getEndTime() == null ||
integralRebate.getProductId() == null integralRebate.getProductId() == null
) { ) {
log.error("OutRechargePriceController -> insertPrice() error!"); log.error("OutRechargePriceController -> insertPrice() error!");
@ -142,6 +144,8 @@ public class BsIntegralRebateController {
if (integralRebate.getPercentage() == null || if (integralRebate.getPercentage() == null ||
integralRebate.getId() == null || integralRebate.getId() == null ||
integralRebate.getStartTime() == null ||
integralRebate.getEndTime() == null ||
integralRebate.getType() == null || integralRebate.getType() == null ||
integralRebate.getProductId() == null integralRebate.getProductId() == null
) { ) {

@ -452,6 +452,7 @@ public class HighOrderSchedule {
object.put("userId" , highOrder.getMemId()); object.put("userId" , highOrder.getMemId());
object.put("orderId" , highOrder.getId()); object.put("orderId" , highOrder.getId());
object.put("companyId" , highOrder.getCompanyId()); object.put("companyId" , highOrder.getCompanyId());
object.put("createTime" , highOrder.getCreateTime());
bsIntegralRebateService.integralRebate(object); bsIntegralRebateService.integralRebate(object);

@ -9,9 +9,7 @@ import org.springframework.stereotype.Component;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.HashMap; import java.util.*;
import java.util.List;
import java.util.Map;
/** /**
* @author hurui * @author hurui
@ -78,4 +76,5 @@ public class ThirdProductConfig {
return object; return object;
} }
} }

@ -1,6 +1,7 @@
package com.hai.service.impl; package com.hai.service.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.hai.common.utils.DateUtil;
import com.hai.dao.BsIntegralRebateMapper; import com.hai.dao.BsIntegralRebateMapper;
import com.hai.entity.BsIntegralRebate; import com.hai.entity.BsIntegralRebate;
import com.hai.entity.BsIntegralRebateExample; import com.hai.entity.BsIntegralRebateExample;
@ -98,13 +99,13 @@ public class BsIntegralRebateServiceImpl implements BsIntegralRebateService {
BsIntegralRebate bsIntegralRebate = findIntegralRebateByMap(map); 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 ); 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); highUserService.goldHandle(object.getLong("userId"), integralNum.intValue(), 1, 4, object.getLong("orderId") , object.getString("remark") + integralNum);
} }
} }
} }

Loading…
Cancel
Save