diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java b/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java index ffea0fa8..4f3d53e2 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java @@ -152,7 +152,8 @@ public class HighOrderController { // 累计订单价格 totalPrice = totalPrice.add(childOrder.getTotalPrice()); } - + highOrder.setTotalPrice(totalPrice); + // 是否使用了优惠券 if (highOrder.getMemDiscountId() != null) { // 卡优惠券信息 diff --git a/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java index 9b7a735f..2f4a897c 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java @@ -394,6 +394,15 @@ public class HighOrderServiceImpl implements HighOrderService { HighDiscountUserRelExample example = new HighDiscountUserRelExample(); HighDiscountUserRelExample.Criteria criteria = example.createCriteria(); + if (userId != null) { + criteria.andUserIdEqualTo(userId); + } + + if (status != null) { + criteria.andStatusEqualTo(status); + } + + example.setOrderByClause("create_time desc"); return highDiscountUserRelMapper.selectByExample(example).size(); } }