| | |
| | | } |
| | | |
| | | if (platformSalesMap != null) { |
| | | BigDecimal feePlatform = s.getFeePlatform(); |
| | | BigDecimal feePlatformPack = s.getFeePlatformPack(); |
| | | BigDecimal feePlatformCheck = s.getFeePlatformCheck(); |
| | | BigDecimal feePlatformTransport = s.getFeePlatformTransport(); |
| | | BigDecimal feePlatform = getAmount(s.getFeePlatform()); |
| | | BigDecimal feePlatformPack = getAmount(s.getFeePlatformPack()); |
| | | BigDecimal feePlatformCheck = getAmount(s.getFeePlatformCheck()); |
| | | BigDecimal feePlatformTransport = getAmount(s.getFeePlatformTransport()); |
| | | |
| | | BigDecimal b = platformSalesMap.get(orderItemId); |
| | | if (b == null) { |
| | |
| | | b = b.add(feePlatform).add(feePlatformPack).add(feePlatformCheck).add(feePlatformTransport); |
| | | platformSalesMap.put(orderItemId, b); |
| | | } |
| | | } |
| | | |
| | | protected BigDecimal getAmount(BigDecimal amount){ |
| | | return amount == null ? new BigDecimal(0) : amount; |
| | | } |
| | | |
| | | protected void prepareSalesAmount(OrderSalesItem s |
| | |
| | | return p; |
| | | } |
| | | |
| | | protected Customer getCustomerByUserId(String userId){ |
| | | Customer p = customerMapper.selectOne(new QueryWrapper<Customer>() |
| | | .eq("user_id", userId)); |
| | | if(p == null){ |
| | | throw new ValidationException("客户不存在"); |
| | | } |
| | | |
| | | return p; |
| | | } |
| | | |
| | | protected Customer getCustomer(Long id){ |
| | | Customer p = customerMapper.selectById(id); |
| | | |
| | | if(p == null){ |
| | | throw new ValidationException("商户不存在"); |
| | | } |
| | | |
| | | return p; |
| | | } |
| | | |
| | | public Partner getCurrentPartner(){ |
| | | String userId = SecurityUtils.getUserId(); |
| | | Partner p = partnerMapper.selectOne(new QueryWrapper<Partner>() |