| | |
| | | product.setTemplate(null); |
| | | product.setStyle(null); |
| | | return product; |
| | | }).collect(Collectors.toList()); |
| | | }).sorted((o1, o2) -> (o1.getSort() == null ? 0 : o1.getSort()) |
| | | - (o2.getSort() == null ? 0 : o2.getSort())).collect(Collectors.toList()); |
| | | return insProducts; |
| | | } |
| | | |
| | |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | public List<InsProduct> getRevocationInsProductList(Integer orderId) { |
| | | InsOrder insOrder = insOrderMapper.selectById(orderId); |
| | | if(Objects.isNull(insOrder)){ |
| | | throw new RuntimeException("未找到该订单"); |
| | | } |
| | | String revocationInsProductIds = insOrder.getRevocationInsProductIds(); |
| | | List<Integer> ids = new ArrayList<>(); |
| | | if(StringUtils.isNotBlank(revocationInsProductIds)){ |
| | | ids = Arrays.asList(revocationInsProductIds.split(",")).stream().map(Integer::parseInt).collect(Collectors.toList()); |
| | | } |
| | | return baseMapper.getRevocationInsProductList(ids); |
| | | } |
| | | |
| | | |
| | | } |
| | | |