|
@@ -180,7 +180,9 @@ public class AfterSalesServiceImpl extends ServiceImpl<AfterSalesMapper, AfterSa
|
|
|
afterSalesGoods.setAfterSalesId(afterSales.getId());
|
|
|
afterSalesGoods.setGoodsNum(orderGoods.getGoodsNum());
|
|
|
afterSalesGoods.setOrderGoodsId(orderGoods.getId());
|
|
|
- //afterSalesGoods.setOrderGrouponGoodsId();
|
|
|
+ afterSalesGoods.setGoodsImg(orderGoods.getGoodsImage());
|
|
|
+ afterSalesGoods.setGoodsName(orderGoods.getGoodsName());
|
|
|
+ afterSalesGoods.setGoodsPrice(orderGoods.getGoodsPrice());
|
|
|
afterSalesGoodss.add(afterSalesGoods);
|
|
|
}
|
|
|
afterSalesGoodsService.saveBatch(afterSalesGoodss);
|
|
@@ -424,13 +426,8 @@ public class AfterSalesServiceImpl extends ServiceImpl<AfterSalesMapper, AfterSa
|
|
|
public AfterSalesVO getUserAfterSalesDetail(Long afterSalesId) {
|
|
|
AfterSales afterSales = getById(afterSalesId);
|
|
|
AfterSalesVO vo = AfterSalesWrapper.build().entityVO(afterSales);
|
|
|
- if (AfterSalesTypeEnum.REFUND.getValue().equals(vo.getType())) {
|
|
|
- List<OrderGoods> list = orderGoodsService.lambdaQuery().eq(OrderGoods::getOrderId, vo.getOrderId()).list();
|
|
|
- vo.setGoodsList(list);
|
|
|
- } else {
|
|
|
- List<OrderGoods> list = orderGoodsService.lambdaQuery().eq(BaseEntity::getId, vo.getOrderGoodsId()).list();
|
|
|
- vo.setGoodsList(list);
|
|
|
- }
|
|
|
+ List<AfterSalesGoods> afterSalesGoods = afterSalesGoodsService.getByAfterSalesId(afterSalesId);
|
|
|
+ vo.setAfterSalesGoodsList(afterSalesGoods);
|
|
|
Order order = orderService.getById(afterSales.getOrderId());
|
|
|
vo.setOrder(OrderWrapper.build().entityVO(order));
|
|
|
vo.setOrderNo(order.getOrderNo());
|