|
@@ -92,7 +92,8 @@ public class MusicGroupDeliveryRecordServiceImpl extends BaseServiceImpl<Long, M
|
|
|
|
|
|
//查询student_payment_order_detail,剔除有声部更换的用户
|
|
|
List<StudentPaymentOrderDetail> studentPaymentOrderDetailList = studentPaymentOrderDetailDao.findUserApplyOrder(null, musicGroupId, DealStatusEnum.SUCCESS);
|
|
|
- studentPaymentOrderDetailList = studentPaymentOrderDetailList.stream().filter(t -> StringUtils.isNotBlank(t.getGoodsIdList())).collect(Collectors.toList());
|
|
|
+
|
|
|
+ studentPaymentOrderDetailList = studentPaymentOrderDetailList.stream().filter((t) -> StringUtils.isNotBlank(t.getGoodsIdList()) && StringUtils.equals(t.getDeliveryBatchNo(), deliveryBatchNo)).collect(Collectors.toList());
|
|
|
|
|
|
if(changeUserIdList != null && changeUserIdList.size() > 0){
|
|
|
Iterator<StudentPaymentOrderDetail> iterator = studentPaymentOrderDetailList.iterator();
|
|
@@ -109,14 +110,16 @@ public class MusicGroupDeliveryRecordServiceImpl extends BaseServiceImpl<Long, M
|
|
|
}
|
|
|
|
|
|
List<Goods> goodsList = goodsService.findGoodsByIds(goodsIdsStr.toString());
|
|
|
- Map<Integer,Goods> goodsMap = new HashMap<Integer, Goods>();
|
|
|
-
|
|
|
- for (Goods g : goodsList) {
|
|
|
- if (goodsMap.containsKey(g.getId())) {
|
|
|
- g.setSellCount(goodsMap.get(g.getId()).getSellCount() + 1);
|
|
|
- } else {
|
|
|
- g.setSellCount(1);
|
|
|
- }
|
|
|
+ Map<Integer, Goods> goodsMap = goodsList.stream().collect(Collectors.toMap(Goods::getId, t -> t));
|
|
|
+
|
|
|
+ Goods g = null;
|
|
|
+ for (String goodsId : goodsIdsStr.toString().split(",")) {
|
|
|
+ g = goodsMap.get(Integer.parseInt(goodsId));
|
|
|
+
|
|
|
+ if(g == null) continue;
|
|
|
+
|
|
|
+ g.setSellCount(g.getSellCount() + 1);
|
|
|
+
|
|
|
goodsMap.put(g.getId(), g);
|
|
|
}
|
|
|
|