|
|
|
@ -1293,6 +1293,23 @@ public class MallOrderServiceImpl extends ServiceImpl<MallOrderMapper, MallOrder |
|
|
|
if(refundTypeStatus == 1){ |
|
|
|
record.setLinkId(order.getShopId()); |
|
|
|
mallRefundRecordMapper.insert(record); |
|
|
|
List<MallOrderGoods> goodsList = mallOrderGoodsMapper.selectByOrderId(order.getId()); |
|
|
|
if (goodsList == null || goodsList.isEmpty()) return; |
|
|
|
List<MallReturnOrderGoods> returnList = goodsList.stream() |
|
|
|
.map(goods -> { |
|
|
|
// 在这里为每个 MallOrderGoods 对象创建并填充对应的 MallReturnOrderGoods 对象
|
|
|
|
MallReturnOrderGoods returnGoods = new MallReturnOrderGoods(); |
|
|
|
returnGoods.setOrderId(record.getId()); |
|
|
|
returnGoods.setProductId(goods.getProductId()); |
|
|
|
returnGoods.setProductName(goods.getProductName()); |
|
|
|
returnGoods.setProductPicture(goods.getProductPicture()); |
|
|
|
returnGoods.setSpecs(goods.getSpecs()); |
|
|
|
returnGoods.setPrice(goods.getPrice()); |
|
|
|
returnGoods.setQuantity(goods.getQuantity()); |
|
|
|
mallReturnOrderGoodsMapper.insert(returnGoods); |
|
|
|
return returnGoods; |
|
|
|
}) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
}else if(refundTypeStatus == 2){ |
|
|
|
record.setLinkId(workerId); |
|
|
|
mallRefundRecordMapper.insert(record); |
|
|
|
@ -1308,6 +1325,23 @@ public class MallOrderServiceImpl extends ServiceImpl<MallOrderMapper, MallOrder |
|
|
|
mallRefundRecordMapper.insert(mallRefundRecord1); |
|
|
|
} |
|
|
|
} |
|
|
|
List<MallOrderGoods> goodsList = mallOrderGoodsMapper.selectByOrderId(order.getId()); |
|
|
|
if (goodsList == null || goodsList.isEmpty()) return; |
|
|
|
List<MallReturnOrderGoods> returnList = goodsList.stream() |
|
|
|
.map(goods -> { |
|
|
|
// 在这里为每个 MallOrderGoods 对象创建并填充对应的 MallReturnOrderGoods 对象
|
|
|
|
MallReturnOrderGoods returnGoods = new MallReturnOrderGoods(); |
|
|
|
returnGoods.setOrderId(order.getId()); |
|
|
|
returnGoods.setProductId(goods.getProductId()); |
|
|
|
returnGoods.setProductName(goods.getProductName()); |
|
|
|
returnGoods.setProductPicture(goods.getProductPicture()); |
|
|
|
returnGoods.setSpecs(goods.getSpecs()); |
|
|
|
returnGoods.setPrice(goods.getPrice()); |
|
|
|
returnGoods.setQuantity(goods.getQuantity()); |
|
|
|
mallReturnOrderGoodsMapper.insert(returnGoods); |
|
|
|
return returnGoods; |
|
|
|
}) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -1417,7 +1451,7 @@ public class MallOrderServiceImpl extends ServiceImpl<MallOrderMapper, MallOrder |
|
|
|
.map(goods -> { |
|
|
|
// 在这里为每个 MallOrderGoods 对象创建并填充对应的 MallReturnOrderGoods 对象
|
|
|
|
MallReturnOrderGoods returnGoods = new MallReturnOrderGoods(); |
|
|
|
returnGoods.setOrderId(record.getId()); |
|
|
|
returnGoods.setOrderId(order.getId()); |
|
|
|
returnGoods.setProductId(goods.getProductId()); |
|
|
|
returnGoods.setProductName(goods.getProductName()); |
|
|
|
returnGoods.setProductPicture(goods.getProductPicture()); |
|
|
|
|