修改话费定时任务问题

dev-discount
袁野 2 years ago
parent 17c61babbf
commit b1733c9d39
  1. 11
      hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java
  2. 4
      hai-service/src/main/java/com/hai/config/HuiLianTongConfig.java

@ -426,8 +426,7 @@ public class HighOrderController {
highOrder.setMerchId(request.getHeader("mchId"));
highOrder.setTotalPrice(totalPrice);
highOrder.setPayPrice(totalActualPrice.subtract(integralDeductionPrice));
highOrder.setDeductionPrice(highOrder.getTotalPrice().subtract(totalActualPrice));
// 是否使用了优惠券
if (highDiscountUserRel != null) {
@ -464,7 +463,7 @@ public class HighOrderController {
highOrder.setDeductionPrice(highDiscountUserRel.getHighDiscount().getDiscountPrice());
// 如果总额小于0
if (payPrice.compareTo(new BigDecimal("0")) == -1) {
if (payPrice.compareTo(new BigDecimal("0")) < 0) {
highOrder.setPayPrice(new BigDecimal("0"));
} else {
highOrder.setPayPrice(payPrice);
@ -496,6 +495,10 @@ public class HighOrderController {
}
}
if (highOrder.getPayPrice() == null) {
highOrder.setPayPrice(totalActualPrice);
}
highOrder.setOrderNo("HF" + DateUtil.date2String(new Date(),"yyyyMMddHHmmss") + IDGenerator.nextId(5));
highOrder.setMemId(userInfoModel.getHighUser().getId());
highOrder.setMemName(userInfoModel.getHighUser().getName());
@ -504,6 +507,8 @@ public class HighOrderController {
highOrder.setOrderStatus(1);
highOrder.setPrintStatus(false);
highOrder.setPrintNum(0);
highOrder.setPayPrice(highOrder.getPayPrice().subtract(integralDeductionPrice));
highOrder.setDeductionPrice(highOrder.getTotalPrice().subtract(highOrder.getPayPrice()));
highOrderService.insertOrder(highOrder);

@ -212,8 +212,8 @@ public class HuiLianTongConfig {
mapPost.put("couNo" , dataObject.getString("couNo"));
mapPost.put("status" , "20");
mapPost.put("couTypeCode" , dataObject.getString("couTypeCode"));
mapPost.put("validStartDate" , dataObject.getDate("validStartDate"));
mapPost.put("validEndDate" , dataObject.getDate("validEndDate"));
mapPost.put("validStartDate" , dataObject.getString("validStartDate"));
mapPost.put("validEndDate" , dataObject.getString("validEndDate"));
JSONObject o = HuiLianTongUnionCardConfig.syncPayOrder(mapPost);
System.out.println("订单同步请求参数---------" + mapPost);
System.out.println("订单同步请求结果---------" + o);

Loading…
Cancel
Save