From 1ea12fd0fb1ebf83d2b85f298b5563d8a17a22e7 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Wed, 31 May 2023 11:03:58 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/cweb/controller/BsPayQrCodeController.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cweb/src/main/java/com/cweb/controller/BsPayQrCodeController.java b/cweb/src/main/java/com/cweb/controller/BsPayQrCodeController.java index ba8b5c4..806d86a 100644 --- a/cweb/src/main/java/com/cweb/controller/BsPayQrCodeController.java +++ b/cweb/src/main/java/com/cweb/controller/BsPayQrCodeController.java @@ -110,7 +110,11 @@ public class BsPayQrCodeController { // 用户优惠 if (StringUtils.isNotBlank(body.getString("phone"))) { - discountActivityList.addAll(storeDiscountActivityService.getUseDiscountListByPhone(body.getString("phone"))); + List userDiscountActivityList = new ArrayList<>(); + List userDiscountActivity = storeDiscountActivityService.getUseDiscountListByPhone(body.getString("phone")); + userDiscountActivityList.addAll(userDiscountActivity.stream().filter(o -> o.getMerId().equals(store.getMerId())).collect(Collectors.toList())); + userDiscountActivityList.addAll(userDiscountActivity.stream().filter(o -> o.getStoreId().equals(store.getId())).collect(Collectors.toList())); + discountActivityList.addAll(userDiscountActivityList); } // 优惠活动 From df34abef57985191b626ac101c984db0dc451399 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Wed, 31 May 2023 11:40:47 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../channel/lakala/LaKaLaTradeSeparateService.java | 10 ++++++---- .../com/hfkj/service/impl/BsTradeOrderServiceImpl.java | 3 ++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/service/src/main/java/com/hfkj/channel/lakala/LaKaLaTradeSeparateService.java b/service/src/main/java/com/hfkj/channel/lakala/LaKaLaTradeSeparateService.java index 1382725..ee276aa 100644 --- a/service/src/main/java/com/hfkj/channel/lakala/LaKaLaTradeSeparateService.java +++ b/service/src/main/java/com/hfkj/channel/lakala/LaKaLaTradeSeparateService.java @@ -72,10 +72,12 @@ public class LaKaLaTradeSeparateService { Map recvDatasMap; for (BsTradeOrderProfitSharingReceiver receiver : profitSharingReceiverList) { - recvDatasMap = new HashMap<>(); - recvDatasMap.put("recv_no", receiver.getReceiverAccount()); - recvDatasMap.put("separate_value", receiver.getReceiverAmount().multiply(new BigDecimal("100")).longValue()); - recvDatasMapList.add(recvDatasMap); + if (receiver.getReceiverAmount().compareTo(new BigDecimal("0")) != 0) { + recvDatasMap = new HashMap<>(); + recvDatasMap.put("recv_no", receiver.getReceiverAccount()); + recvDatasMap.put("separate_value", receiver.getReceiverAmount().multiply(new BigDecimal("100")).longValue()); + recvDatasMapList.add(recvDatasMap); + } } map.put("recv_datas", recvDatasMapList); commonParam.put("req_data", map); diff --git a/service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java b/service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java index 412c213..90140c1 100644 --- a/service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java @@ -108,9 +108,11 @@ public class BsTradeOrderServiceImpl implements BsTradeOrderService { tradeOrder.setTradeActualAmount(tradeAmount); tradeOrder.setStoreDiscountSatisfy(false); tradeOrder.setUserPhone(userPhone); + tradeOrder.setProfitSharingStatus(false); // 门店优惠 if (storeDiscount != null) { + tradeOrder.setProfitSharingStatus(true); tradeOrder.setStoreDiscountId(storeDiscount.getId()); tradeOrder.setStoreDiscountName(storeDiscount.getName()); tradeOrder.setStoreDiscountType(storeDiscount.getDiscountType()); @@ -199,7 +201,6 @@ public class BsTradeOrderServiceImpl implements BsTradeOrderService { tradeOrder.setQrCodeId(MapUtils.getLong(param, "qrCodeId")); } - tradeOrder.setProfitSharingStatus(false); editOrder(tradeOrder); Map returnParam = new HashMap<>();