From cf1d0fdbdbfe969500508ae9c0fa51cc37d06577 Mon Sep 17 00:00:00 2001 From: xuhy <3313886187@qq.com> Date: 星期二, 06 六月 2023 12:08:17 +0800 Subject: [PATCH] 代理商修改,分公司修改列表 --- management/guns-admin/guns-admin (1).iml | 10 ++++++++-- management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TAgentServiceImpl.java | 4 +++- management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TBranchOfficeServiceImpl.java | 8 +++++--- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git "a/management/guns-admin/guns-admin \0501\051.iml" "b/management/guns-admin/guns-admin \0501\051.iml" index ae2aa7e..d060d6c 100644 --- "a/management/guns-admin/guns-admin \0501\051.iml" +++ "b/management/guns-admin/guns-admin \0501\051.iml" @@ -32,8 +32,6 @@ </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="library" name="Maven: cn.hutool:hutool-core:5.3.8" level="project" /> - <orderEntry type="library" name="Maven: cn.hutool:hutool-crypto:5.3.8" level="project" /> <orderEntry type="module" module-name="guns-core (1)" /> <orderEntry type="library" name="Maven: com.baomidou:mybatisplus-spring-boot-starter:1.0.5" level="project" /> <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-configuration-processor:2.0.4.RELEASE" level="project" /> @@ -259,5 +257,13 @@ <orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.23.Final" level="project" /> <orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.23.Final" level="project" /> <orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.23.Final" level="project" /> + <orderEntry type="library" scope="PROVIDED" name="Maven: org.projectlombok:lombok:1.18.20" level="project" /> + <orderEntry type="library" name="Maven: com.github.wechatpay-apiv3:wechatpay-java-shangmi:0.2.1" level="project" /> + <orderEntry type="library" name="Maven: com.github.wechatpay-apiv3:wechatpay-java-core:0.2.1" level="project" /> + <orderEntry type="library" scope="RUNTIME" name="Maven: com.tencent.kona:kona-crypto:1.0.3" level="project" /> + <orderEntry type="library" scope="RUNTIME" name="Maven: org.bouncycastle:bcprov-jdk18on:1.72" level="project" /> + <orderEntry type="library" scope="RUNTIME" name="Maven: com.tencent.kona:kona-pkix:1.0.3" level="project" /> + <orderEntry type="library" scope="RUNTIME" name="Maven: com.tencent.kona:kona-provider:1.0.3" level="project" /> + <orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.7.7" level="project" /> </component> </module> \ No newline at end of file diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TAgentServiceImpl.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TAgentServiceImpl.java index 33fde55..cdb6518 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TAgentServiceImpl.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TAgentServiceImpl.java @@ -210,7 +210,9 @@ BigDecimal couponPriceSum = BigDecimal.ZERO; for (TUserToCoupon userToCoupon : userToCoupons) { TCoupon tCoupons1 = tCouponMapper.selectById(userToCoupon.getCouponId()); - couponPriceSum = couponPriceSum.add(tCoupons1.getCouponPreferentialAmount().multiply(new BigDecimal(userToCoupon.getCouponTotal()))); + if(Objects.nonNull(tCoupons1)){ + couponPriceSum = couponPriceSum.add(tCoupons1.getCouponPreferentialAmount().multiply(new BigDecimal(userToCoupon.getCouponTotal()))); + } } tAgentResp.setCouponPriceSum(couponPriceSum); } diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TBranchOfficeServiceImpl.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TBranchOfficeServiceImpl.java index 61bea73..8421a62 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TBranchOfficeServiceImpl.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TBranchOfficeServiceImpl.java @@ -185,12 +185,14 @@ // 已发放优惠券 tBranchOfficeResp.setTotalCount(totalCount); - BigDecimal orderPriceCount = new BigDecimal("0"); + BigDecimal orderPriceCount = BigDecimal.ZERO; // 累计优惠券金额 for (TUserToCoupon tUserToCoupon : tUserToCoupons) { TCoupon tCoupon = tCouponMapper.selectById(tUserToCoupon.getCouponId()); - BigDecimal price = tCoupon.getCouponPreferentialAmount().multiply(new BigDecimal(tUserToCoupon.getCouponTotal())); - orderPriceCount = orderPriceCount.add(price); + if(Objects.nonNull(tCoupon)){ + BigDecimal price = tCoupon.getCouponPreferentialAmount().multiply(new BigDecimal(tUserToCoupon.getCouponTotal())); + orderPriceCount = orderPriceCount.add(price); + } } tBranchOfficeResp.setOrderPriceCount(orderPriceCount); -- Gitblit v1.7.1