|
@@ -1213,16 +1213,17 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
return pageInfo;
|
|
|
}
|
|
|
|
|
|
- @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
public void saveSellOrder(String orderNo) {
|
|
|
StudentPaymentOrder orderByOrderNo = studentPaymentOrderService.findOrderByOrderNo(orderNo);
|
|
|
StudentGoodsSell studentGoodsSell = studentGoodsSellDao.findByOrderNo(orderNo);
|
|
|
String goodsJson = studentGoodsSell.getGoodsJson();
|
|
|
List<GoodsSellDto> goodsSellDtos = JSONObject.parseArray(goodsJson, GoodsSellDto.class);
|
|
|
//用户选择的商品
|
|
|
- Map<Integer, List<GoodsSellDto>> collect = goodsSellDtos.stream().collect(Collectors.groupingBy(GoodsSellDto::getGoodsId));
|
|
|
- List<Integer> goodsIds = new ArrayList<>();
|
|
|
- goodsSellDtos.forEach(e -> {
|
|
|
+// Map<Integer, List<GoodsSellDto>> collect = goodsSellDtos.stream().collect(Collectors.groupingBy(GoodsSellDto::getGoodsId));
|
|
|
+ List<Integer> goodsIds = goodsSellDtos.stream().map(e -> e.getGoodsId()).collect(Collectors.toList());
|
|
|
+ sellOrderService.initSellOrder(orderByOrderNo,null,goodsIds,null,true);
|
|
|
+ /*goodsSellDtos.forEach(e -> {
|
|
|
for (int i = 0; i < e.getGoodsNum(); i++) {
|
|
|
goodsIds.add(e.getGoodsId());
|
|
|
}
|
|
@@ -1437,7 +1438,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
}
|
|
|
sellOrderService.batchInsert(sellOrderList);
|
|
|
sellOrderService.syncSellOrder2Mall(sellOrderList,orderByOrderNo);
|
|
|
- }
|
|
|
+ }*/
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -1537,7 +1538,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
studentPaymentOrder.getBalancePaymentAmount(), couponRemitFee);*/
|
|
|
studentPaymentOrder.setExpectAmount(studentPaymentOrder.getExpectAmount().add(repairInfo.getExemptionAmount()));
|
|
|
studentPaymentOrder.setCouponRemitFee(couponRemitFee);
|
|
|
- sellOrderService.initSellOrder(studentPaymentOrder,null,goodsIds,null);
|
|
|
+ sellOrderService.initSellOrder(studentPaymentOrder,null,goodsIds,null,true);
|
|
|
}
|
|
|
}
|
|
|
|