From e497a2df2d525004ced0dac21eca004a268b64b2 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Mon, 5 Apr 2021 19:34:20 +0800 Subject: [PATCH] =?UTF-8?q?'=E4=BF=AE=E5=A4=8D=E5=B7=B2=E7=9F=A5=E9=97=AE?= =?UTF-8?q?=E9=A2=98'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/cweb/controller/HighOrderController.java | 3 ++- .../java/com/hai/service/impl/HighOrderServiceImpl.java | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) 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(); } }