From b90c325c1ac43f563000fdba41a4b9d98cebe901 Mon Sep 17 00:00:00 2001 From: "shuo.wang" Date: Fri, 6 Jun 2025 10:51:58 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E7=BC=B4=E8=B4=B9=E9=87=91=E9=A2=9D?= =?UTF-8?q?=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/cool/store/service/impl/LinePayServiceImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/LinePayServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/LinePayServiceImpl.java index 275285147..189216109 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/LinePayServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/LinePayServiceImpl.java @@ -52,6 +52,7 @@ import java.math.BigDecimal; import java.text.MessageFormat; import java.time.LocalDate; import java.util.*; +import java.util.function.Function; import java.util.stream.Collectors; import static com.cool.store.utils.poi.DateUtils.SPECIAL_DATE_START; @@ -166,8 +167,12 @@ public class LinePayServiceImpl implements LinePayService { FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectByShopId(request.getShopId()); //判断付款人最多2人(可重复) List list = linePayDAO.getFranchiseFeePayInfoByShopId(request.getShopId()); + Map payIdMap = list.stream().collect(Collectors.toMap(LinePayDO::getId, Function.identity())); + if (request.getId()!=null){ + payIdMap.remove(request.getId()); + } //判断缴费金额不能大于未缴费金额 - BigDecimal total = list.stream() + BigDecimal total = payIdMap.values().stream() .map(LinePayDO::getAmount) .reduce(BigDecimal.ZERO, BigDecimal::add); //应缴金额