| | |
| | | // 已发放优惠券 |
| | | 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); |
| | | |
| | |
| | | } |
| | | tBranchOffice.setDistrictName(area.getName()); |
| | | tBranchOffice.setDistrictCode(area.getCode()); |
| | | }else { |
| | | } |
| | | /*else { |
| | | tBranchOffice.setDistrictName(city.getName()); |
| | | tBranchOffice.setDistrictCode(city.getCode()); |
| | | } |
| | | }*/ |
| | | |
| | | // 通过省市查询代理商 |
| | | List<TAgent> tAgent = tAgentMapper.selectList(new EntityWrapper<TAgent>().eq("provinceCode", province.getCode()) |