| | |
| | | if(totalAmount.doubleValue() <= 0){//假如总价小于等于0,则支付0.01元 |
| | | totalAmount = new BigDecimal(0.01); |
| | | } |
| | | order.setTotalAmount(totalAmount.add(p.getPacking()).add(transportFee)); |
| | | order.setTotalAmount(totalAmount); |
| | | |
| | | order.setCustomer(address.getName()); |
| | | order.setCustomerTel(address.getTel()); |
| | |
| | | orderIds.add(o.getId()); |
| | | } |
| | | |
| | | List<OrderItem> itemList = orderItemMapper.selectList( |
| | | new QueryWrapper<OrderItem>().in("order_id", orderIds)); |
| | | List<OrderItemListDTO> itemList = orderItemMapper.getOrderItems(orderIds); |
| | | Map<String, List<OrderItemListDTO>> map = new HashMap<>(); |
| | | for (OrderItem oi : itemList) { |
| | | for (OrderItemListDTO oi : itemList) { |
| | | String orderId = oi.getOrderId(); |
| | | List<OrderItemListDTO> ll = map.computeIfAbsent(orderId, k -> new ArrayList<>()); |
| | | OrderItemListDTO d = new OrderItemListDTO(); |
| | |
| | | if(llc == null){ |
| | | llc = new OrderCheckLocationListDTO(); |
| | | BeanUtils.copyProperties(c, llc); |
| | | rMap.put(locationId, llc); |
| | | llc.setTotalAmount(new BigDecimal(0)); |
| | | |
| | | rMap.put(locationId, llc); |
| | | result.add(llc); |
| | | } |
| | | |