2 Commits d0eff2e281 ... 7bcc5ab874

Author SHA1 Message Date
  zhanghui 7bcc5ab874 feat:解决报错 3 months ago
  zhanghui c3ff4cc1e8 feat:售后申请 3 months ago
17 changed files with 147 additions and 64 deletions
  1. 11 7
      src/main/java/org/springblade/modules/api/controller/ApiAfterSalesController.java
  2. 1 0
      src/main/java/org/springblade/modules/api/controller/ApiMerchantOrderController.java
  3. 11 0
      src/main/java/org/springblade/modules/api/controller/ApiOrderGoodsController.java
  4. 5 1
      src/main/java/org/springblade/modules/api/request/AfterSalesRequest.java
  5. 18 0
      src/main/java/org/springblade/modules/finance/entity/AfterSales.java
  6. 1 1
      src/main/java/org/springblade/modules/finance/mapper/AfterSalesMapper.java
  7. 1 5
      src/main/java/org/springblade/modules/finance/mapper/AfterSalesMapper.xml
  8. 4 1
      src/main/java/org/springblade/modules/finance/mapper/OrderGoodsMapper.xml
  9. 1 0
      src/main/java/org/springblade/modules/finance/service/IAfterSalesGoodsService.java
  10. 2 1
      src/main/java/org/springblade/modules/finance/service/IAfterSalesService.java
  11. 9 0
      src/main/java/org/springblade/modules/finance/service/impl/AfterSalesGoodsServiceImpl.java
  12. 45 47
      src/main/java/org/springblade/modules/finance/service/impl/AfterSalesServiceImpl.java
  13. 20 1
      src/main/java/org/springblade/modules/finance/service/impl/OrderGoodsServiceImpl.java
  14. 1 0
      src/main/java/org/springblade/modules/finance/service/impl/OrderGrouponServiceImpl.java
  15. 1 0
      src/main/java/org/springblade/modules/finance/service/impl/OrderServiceImpl.java
  16. 4 0
      src/main/java/org/springblade/modules/finance/vo/AfterSalesVO.java
  17. 12 0
      src/main/java/org/springblade/modules/finance/vo/OrderGoodsVO.java

+ 11 - 7
src/main/java/org/springblade/modules/api/controller/ApiAfterSalesController.java

@@ -67,13 +67,17 @@ public class ApiAfterSalesController {
     @ApiOperation(value = "提交售后")
     @PostMapping("submit")
     public R submit(@Valid @RequestBody AfterSalesRequest request) {
-        if (AfterSalesTypeEnum.RETURN_GOODS.getValue().equals(request.getAfterSalesType())) {
-            afterSalesService.submit(request);
-        } else if (AfterSalesTypeEnum.PART_REFUND.getValue().equals(request.getAfterSalesType())) {
-            afterSalesService.refundSubmit(request);
-        } else if (AfterSalesTypeEnum.NOT_ARRIVE_REFUND.getValue().equals(request.getAfterSalesType())) {
-            afterSalesService.applyGrouponAfterRefund(request.getOrderId());
-        }
+
+        afterSalesService.submit(request);
+
+
+//        if (AfterSalesTypeEnum.RETURN_GOODS.getValue().equals(request.getAfterSalesType())) {
+//            afterSalesService.submit(request);
+//        } else if (AfterSalesTypeEnum.PART_REFUND.getValue().equals(request.getAfterSalesType())) {
+//            afterSalesService.refundSubmit(request);
+//        } else if (AfterSalesTypeEnum.NOT_ARRIVE_REFUND.getValue().equals(request.getAfterSalesType())) {
+//            afterSalesService.applyGrouponAfterRefund(request.getOrderId());
+//        }
         return R.success("ok");
     }
 

+ 1 - 0
src/main/java/org/springblade/modules/api/controller/ApiMerchantOrderController.java

@@ -38,6 +38,7 @@ public class ApiMerchantOrderController {
     @Lazy
     private final IOrderGoodsService iOrderGoodsService;
 
+    @Lazy
     private final IOrderService iOrderService;
 
     @ApiLog("订单列表(订单管理)")

+ 11 - 0
src/main/java/org/springblade/modules/api/controller/ApiOrderGoodsController.java

@@ -1,6 +1,7 @@
 package org.springblade.modules.api.controller;
 
 import cn.hutool.core.lang.Assert;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
@@ -13,8 +14,10 @@ import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
+import org.springblade.modules.finance.entity.AfterSales;
 import org.springblade.modules.finance.entity.Order;
 import org.springblade.modules.finance.entity.OrderGoods;
+import org.springblade.modules.finance.service.IAfterSalesService;
 import org.springblade.modules.finance.service.IOrderGoodsService;
 import org.springblade.modules.finance.service.IOrderService;
 import org.springblade.modules.finance.vo.MerchantPageOrderVO;
@@ -38,6 +41,8 @@ public class ApiOrderGoodsController {
 
     private final IOrderGoodsService iOrderGoodsService;
     private final IOrderService iOrderService;
+    private final IAfterSalesService afterSalesService;
+
 
     @GetMapping("/user")
     @ApiOperationSupport(order = 1)
@@ -73,6 +78,12 @@ public class ApiOrderGoodsController {
         orderGoodsVO.setPaymentAmount(order.getPaymentAmount());
         orderGoodsVO.setTotalAmount(order.getTotalAmount());
         orderGoodsVO.setDiscountAmount(order.getDiscountAmount());
+        if (order.getIsAftersales() == 1){
+            LambdaQueryWrapper<AfterSales> q = new LambdaQueryWrapper<>();
+            q.eq(AfterSales::getOrderId,order.getId());
+            AfterSales afterSales = afterSalesService.getOne(q);
+            orderGoodsVO.setAfterSales(afterSales);
+        }
         return R.data(orderGoodsVO);
     }
 

+ 5 - 1
src/main/java/org/springblade/modules/api/request/AfterSalesRequest.java

@@ -35,7 +35,11 @@ public class  AfterSalesRequest {
     @ApiModelProperty("售后原因")
     private String reason;
 
+    @ApiModelProperty("补充描述")
+    private String afterSaleDescribe;
+
+
     @ApiModelProperty("售后商品图片")
     private List<String> images;
-    
+
 }

+ 18 - 0
src/main/java/org/springblade/modules/finance/entity/AfterSales.java

@@ -39,8 +39,26 @@ public class AfterSales extends BaseEntity {
 	/**
 	* 售后原因
 	*/
+	@ApiModelProperty(value = "售后原因ID")
+	private Long reasonId;
+
+	/**
+	 * 补充描述
+	 */
 	@ApiModelProperty(value = "售后原因")
 	private String reason;
+
+	/**
+	 * 补充描述
+	 */
+	@ApiModelProperty(value = "补充描述")
+	private String afterSaleDescribe;
+
+	/**
+	 * 图片集合
+	 */
+	@ApiModelProperty(value = "图片集合")
+	private String imgListStr;
 	/**
 	* 售后状态 0-处理中 1-完成 2-关闭
 	*/

+ 1 - 1
src/main/java/org/springblade/modules/finance/mapper/AfterSalesMapper.java

@@ -39,7 +39,7 @@ public interface AfterSalesMapper extends BaseMapper<AfterSales> {
 	 */
 	List<AfterSalesVO> selectAfterSalesPage(IPage page, AfterSalesVO afterSales);
 
-	List<AfterSalesVO> selectUserAfterSalesList(IPage pag, Long userId, Integer state);
+	IPage<AfterSalesVO> selectUserAfterSalesList(IPage pag, Long userId,Integer state);
 
     List<AfterSalesVO> getByGrouponIds(List<Long> gIds);
 

+ 1 - 5
src/main/java/org/springblade/modules/finance/mapper/AfterSalesMapper.xml

@@ -24,13 +24,9 @@
     </select>
     <select id="selectUserAfterSalesList" resultType="org.springblade.modules.finance.vo.AfterSalesVO">
         SELECT
-            s.*,
-            g.main_title,
-            g.groupon_start_time,
-            g.groupon_end_time
+            s.*
         FROM
             t_after_sales s
-            JOIN t_groupon g ON s.groupon_id = g.id
             WHERE s.user_id = #{userId}
             <if test="state != null">
                 <if test="state == 1">

+ 4 - 1
src/main/java/org/springblade/modules/finance/mapper/OrderGoodsMapper.xml

@@ -86,9 +86,12 @@
             t_order o
             JOIN t_order_goods og ON o.id = og.order_id
         WHERE o.is_delete = 0 and o.user_id = #{p.userId}
-        <if test="p.orderState != 0">
+        <if test="p.orderState != 0 and p.orderState != null">
             and o.order_state = #{p.orderState}
         </if>
+        <if test="p.isAfterSales != null">
+            and o.is_aftersales = #{p.isAfterSales}
+        </if>
         ORDER BY o.create_time desc
     </select>
 

+ 1 - 0
src/main/java/org/springblade/modules/finance/service/IAfterSalesGoodsService.java

@@ -43,4 +43,5 @@ public interface IAfterSalesGoodsService extends IService<AfterSalesGoods> {
 
 	List<OrderGoods> getGoodsByAfterSalesId(Long afterSalesId);
 
+    List<AfterSalesGoods> getByAfterSalesId(Long id);
 }

+ 2 - 1
src/main/java/org/springblade/modules/finance/service/IAfterSalesService.java

@@ -19,6 +19,7 @@ package org.springblade.modules.finance.service;
 import org.springblade.common.enums.AfterSalesTypeEnum;
 import org.springblade.modules.api.request.AfterSalesRequest;
 import org.springblade.modules.finance.entity.AfterSales;
+import org.springblade.modules.finance.entity.AfterSalesGoods;
 import org.springblade.modules.finance.vo.AfterSalesVO;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -65,7 +66,7 @@ public interface IAfterSalesService extends IService<AfterSales> {
 
 	void bindLogisticsNo(String afterSalesNo, String logisticsNo);
 
-	IPage<AfterSalesVO> getUserAfterSalesList(IPage<Object> page, Long userId, Integer state);
+	IPage<AfterSalesVO> getUserAfterSalesList(IPage<Object> page, Long userId,Integer state);
 
 	AfterSalesVO getUserAfterSalesDetail(Long afterSalesId);
 

+ 9 - 0
src/main/java/org/springblade/modules/finance/service/impl/AfterSalesGoodsServiceImpl.java

@@ -16,6 +16,7 @@
  */
 package org.springblade.modules.finance.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springblade.modules.finance.entity.AfterSalesGoods;
@@ -41,6 +42,14 @@ public class AfterSalesGoodsServiceImpl extends ServiceImpl<AfterSalesGoodsMappe
 		return this.baseMapper.selectGoodsByAfterSalesId(afterSalesId);
 	}
 
+	@Override
+	public List<AfterSalesGoods> getByAfterSalesId(Long id) {
+		LambdaQueryWrapper<AfterSalesGoods> q = new LambdaQueryWrapper<>();
+		q.eq(AfterSalesGoods::getAfterSalesId,id);
+		List<AfterSalesGoods> list = this.list(q);
+		return list;
+	}
+
 	@Override
 	public IPage<AfterSalesGoodsVO> selectAfterSalesGoodsPage(IPage<AfterSalesGoodsVO> page, AfterSalesGoodsVO afterSalesGoods) {
 		return page.setRecords(baseMapper.selectAfterSalesGoodsPage(page, afterSalesGoods));

+ 45 - 47
src/main/java/org/springblade/modules/finance/service/impl/AfterSalesServiceImpl.java

@@ -17,6 +17,7 @@
 package org.springblade.modules.finance.service.impl;
 
 import cn.hutool.core.collection.CollUtil;
+import com.alibaba.fastjson.JSON;
 import org.springblade.common.base.BaseEntity;
 import org.springblade.common.cache.ParamCache;
 import org.springblade.common.constant.CacheBizConstant;
@@ -38,6 +39,7 @@ import org.springblade.modules.finance.wrapper.OrderWrapper;
 import org.springblade.modules.groupon.entity.Groupon;
 import org.springblade.modules.groupon.service.IGrouponService;
 import org.springblade.modules.mall.service.IStoreService;
+import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springframework.transaction.annotation.Transactional;
@@ -46,10 +48,7 @@ import org.springframework.util.Assert;
 import javax.annotation.Resource;
 import java.math.BigDecimal;
 import java.time.LocalDateTime;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.function.Function;
 import java.util.stream.Collectors;
 
@@ -63,14 +62,19 @@ import java.util.stream.Collectors;
 public class AfterSalesServiceImpl extends ServiceImpl<AfterSalesMapper, AfterSales> implements IAfterSalesService {
 
 	@Resource
+	@Lazy
 	private IOrderGoodsService orderGoodsService;
 	@Resource
+	@Lazy
 	private IOrderService orderService;
 	@Resource
+	@Lazy
 	private IOrderGrouponService orderGrouponService;
 	@Resource
+	@Lazy
 	private IOrderRefundService orderRefundService;
 	@Resource
+	@Lazy
 	private IStoreService storeService;
 	@Resource
 	private ICommissionService commissionService;
@@ -79,6 +83,7 @@ public class AfterSalesServiceImpl extends ServiceImpl<AfterSalesMapper, AfterSa
 	@Resource
 	private IGrouponService grouponService;
 	@Resource
+	@Lazy
 	private IAfterSalesGoodsService afterSalesGoodsService;
 	@Resource
 	private IAppointGoodsService appointGoodsService;
@@ -127,21 +132,27 @@ public class AfterSalesServiceImpl extends ServiceImpl<AfterSalesMapper, AfterSa
 
 		order.setIsAftersales(YesOrNoEnum.YES.getValue());
 		orderService.updateById(order);
-		OrderGroupon orderGroupon = orderGrouponService.lambdaQuery().eq(OrderGroupon::getOrderId, request.getOrderId()).one();
-		Assert.notNull(orderGroupon, "orderGroupon数据不存在");
-		Groupon groupon = grouponService.getById(orderGroupon.getGrouponId());
-		Assert.notNull(orderGroupon, "groupon数据不存在");
+//		OrderGroupon orderGroupon = orderGrouponService.lambdaQuery().eq(OrderGroupon::getOrderId, request.getOrderId()).one();
+//		Assert.notNull(orderGroupon, "orderGroupon数据不存在");
+//		Groupon groupon = grouponService.getById(orderGroupon.getGrouponId());
+//		Assert.notNull(orderGroupon, "groupon数据不存在");
 
 		int afterSalesDays = Integer.parseInt(ParamCache.getValueDefault(CacheBizConstant.ORDER_AFTER_SALES_DAYS, "3"));
 		// 校验是否能申请售后
-		LocalDateTime time = groupon.getTakeStartTime().plusDays(afterSalesDays);
-		if (time.isBefore(LocalDateTime.now())) {
+		Calendar calendar = Calendar.getInstance();
+		calendar.setTime(order.getCreateTime());
+		calendar.add(Calendar.DAY_OF_MONTH,afterSalesDays);
+		Date time = calendar.getTime();
+//		LocalDateTime time = groupon.getTakeStartTime().plusDays(afterSalesDays);
+		if (time.compareTo(new Date()) <= 0) {
 			throw new ServiceException("已过售后期");
 		}
 
 		// 校验商品是否已经申请过售后
-		List<Long> collect = request.getAfterGoodsList().stream().map(BaseEntity::getId).collect(Collectors.toList());
-		List<OrderGoods> list = orderGoodsService.lambdaQuery().in(BaseEntity::getId, collect).list();
+		List<Long> goodsIds = request.getAfterGoodsList().stream().map(OrderGoods::getGoodsId).collect(Collectors.toList());
+		List<OrderGoods> list = orderGoodsService.lambdaQuery()
+				.eq(OrderGoods::getOrderId,request.getOrderId())
+				.in(OrderGoods::getGoodsId, goodsIds).list();
 		for (OrderGoods orderGoods : list) {
 			if (YesOrNoEnum.YES.getValue().equals(orderGoods.getIsAfterSales())) {
 				throw new ServiceException("商品【"+orderGoods.getGoodsName()+"】已申请过售后");
@@ -150,28 +161,17 @@ public class AfterSalesServiceImpl extends ServiceImpl<AfterSalesMapper, AfterSa
 		}
 		// 更新售后状态
 		orderGoodsService.updateBatchById(list);
-
-		Map<Long, OrderGoods> map = request.getAfterGoodsList().stream().collect(Collectors.toMap(BaseEntity::getId, Function.identity()));
-		List<AfterSales> afterSalesList = new ArrayList<>();
-		for (OrderGoods goods : list) {
-			AfterSales afterSales = init();
-			afterSales.setOrderId(request.getOrderId());
-			afterSales.setReason(request.getReason());
-			afterSales.setType(request.getAfterSalesType());
-			afterSales.setOrderGoodsId(goods.getId());
-
-			OrderGoods o = map.get(goods.getId());
-			afterSales.setReturnGoodsNum(o.getGoodsNum());
-			afterSales.setIsArrived(YesOrNoEnum.NO.getValue());
-			afterSales.setUserId(AuthUtil.getUserId());
-			afterSales.setStoreId(goods.getShopId());
-			afterSales.setGrouponId(orderGroupon.getGrouponId());
-			afterSalesList.add(afterSales);
-		}
-		saveBatch(afterSalesList);
-
-		// TODO: 2024/7/29   将分销收益改为无效,所有售后结束后重新计算收益
-		//commissionService.invalidCommission(order.getId());
+		AfterSales afterSales = init();
+		afterSales.setOrderId(request.getOrderId());
+		afterSales.setType(request.getAfterSalesType());
+		afterSales.setReason(request.getReason());
+		afterSales.setReasonId(request.getReasonId());
+		afterSales.setAfterSaleDescribe(request.getAfterSaleDescribe());
+		afterSales.setImgListStr(JSON.toJSONString(request.getImages()));
+		afterSales.setIsArrived(YesOrNoEnum.NO.getValue());
+		afterSales.setUserId(AuthUtil.getUserId());
+		afterSales.setReturnGoodsNum(request.getAfterGoodsList().get(0).getRefundGoodsNum());
+		this.save(afterSales);
 	}
 
 	@Override
@@ -481,20 +481,18 @@ public class AfterSalesServiceImpl extends ServiceImpl<AfterSalesMapper, AfterSa
 	}
 
 	@Override
-	public IPage<AfterSalesVO> getUserAfterSalesList(IPage page, Long userId, Integer state) {
-		List<AfterSalesVO> afterSalesVOS = baseMapper.selectUserAfterSalesList(page, userId, state);
-		if (CollUtil.isNotEmpty(afterSalesVOS)) {
-			for (AfterSalesVO vo : afterSalesVOS) {
-				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);
-				}
-			}
+	public IPage<AfterSalesVO> getUserAfterSalesList(IPage page, Long userId,Integer state ) {
+		IPage<AfterSalesVO> afterSalesVOS = baseMapper.selectUserAfterSalesList(page, userId,state);
+		if (CollUtil.isEmpty(afterSalesVOS.getRecords())){
+			return afterSalesVOS;
+		}
+		for (AfterSalesVO vo : afterSalesVOS.getRecords()) {
+			List<OrderGoods> list = orderGoodsService.lambdaQuery().eq(OrderGoods::getOrderId, vo.getOrderId()).list();
+			vo.setGoodsList(list);
+			List<AfterSalesGoods> list1 = afterSalesGoodsService.lambdaQuery().eq(AfterSalesGoods::getAfterSalesId,vo.getId()).list();
+			vo.setAfterSalesGoodsList(list1);
 		}
-		return page.setRecords(afterSalesVOS);
+		return afterSalesVOS;
 	}
 
 	@Override

+ 20 - 1
src/main/java/org/springblade/modules/finance/service/impl/OrderGoodsServiceImpl.java

@@ -1,16 +1,22 @@
 package org.springblade.modules.finance.service.impl;
 
 import cn.hutool.core.lang.Assert;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import lombok.AllArgsConstructor;
+import org.springblade.common.enums.YesOrNoEnum;
 import org.springblade.modules.api.request.SubmitOrderRequest;
 import org.springblade.modules.api.service.SubmitOrderService;
 import org.springblade.modules.business.entity.FacilityCargoWay;
 import org.springblade.modules.business.entity.Shop;
 import org.springblade.modules.business.service.IFacilityCargoWayService;
 import org.springblade.modules.business.service.IShopService;
+import org.springblade.modules.finance.entity.AfterSales;
+import org.springblade.modules.finance.entity.AfterSalesGoods;
 import org.springblade.modules.finance.entity.Order;
 import org.springblade.modules.finance.entity.OrderGoods;
+import org.springblade.modules.finance.service.IAfterSalesGoodsService;
+import org.springblade.modules.finance.service.IAfterSalesService;
 import org.springblade.modules.finance.service.IOrderService;
 import org.springblade.modules.finance.vo.MerchantPageOrderVO;
 import org.springblade.modules.finance.vo.OrderGoodsVO;
@@ -21,11 +27,14 @@ import org.springblade.modules.mall.entity.GoodsInfo;
 import org.springblade.modules.mall.service.IGoodsInfoService;
 import org.springblade.modules.system.entity.User;
 import org.springblade.modules.system.service.IUserService;
+import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springframework.transaction.annotation.Transactional;
 
+import javax.annotation.Resource;
 import java.math.BigDecimal;
+import java.util.List;
 
 /**
  * 商品订单表 服务实现类
@@ -42,6 +51,7 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
 	private final IFacilityCargoWayService iFacilityCargoWayService;
 	private final IShopService iShopService;
 	private final IUserService iUserService;
+	private final IAfterSalesService afterSalesService;
 
 	@Override
 	public IPage<OrderGoodsVO> selectOrderGoodsPage(IPage<OrderGoodsVO> page, OrderGoodsVO orderGoods) {
@@ -50,7 +60,16 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
 
 	@Override
 	public IPage<OrderGoodsVO> selectUserOrder(IPage<OrderGoodsVO> page, OrderGoodsVO orderGoods) {
-		return page.setRecords(baseMapper.selectUserOrder(page, orderGoods));
+		List<OrderGoodsVO> orderGoodsVOS = baseMapper.selectUserOrder(page, orderGoods);
+		for (OrderGoodsVO order : orderGoodsVOS) {
+			if (YesOrNoEnum.YES.getValue().equals(order.getIsAfterSales())){
+				LambdaQueryWrapper<AfterSales> q = new LambdaQueryWrapper<>();
+				q.eq(AfterSales::getOrderId,order.getOrderId());
+				AfterSales afterSales = afterSalesService.getOne(q);
+				order.setAfterSales(afterSales);
+			}
+		}
+		return page.setRecords(orderGoodsVOS);
 	}
 
 	@Override

+ 1 - 0
src/main/java/org/springblade/modules/finance/service/impl/OrderGrouponServiceImpl.java

@@ -80,6 +80,7 @@ public class OrderGrouponServiceImpl extends ServiceImpl<OrderGrouponMapper, Ord
 	@Resource
 	private IAfterSalesService afterSalesService;
 	@Resource
+	@Lazy
 	private IAfterSalesGoodsService afterSalesGoodsService;
 
 	@Override

+ 1 - 0
src/main/java/org/springblade/modules/finance/service/impl/OrderServiceImpl.java

@@ -84,6 +84,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
 	@Resource
 	private ICommissionService commissionService;
 	@Resource
+	@Lazy
 	private IAfterSalesGoodsService afterSalesGoodsService;
 
 	@Override

+ 4 - 0
src/main/java/org/springblade/modules/finance/vo/AfterSalesVO.java

@@ -23,6 +23,7 @@ import lombok.EqualsAndHashCode;
 import org.springblade.common.enums.AfterSalesStatusEnum;
 import org.springblade.common.enums.AfterSalesTypeEnum;
 import org.springblade.modules.finance.entity.AfterSales;
+import org.springblade.modules.finance.entity.AfterSalesGoods;
 import org.springblade.modules.finance.entity.OrderGoods;
 import org.springblade.modules.finance.entity.OrderRefund;
 import org.springblade.modules.mall.vo.StoreVO;
@@ -53,6 +54,9 @@ public class AfterSalesVO extends AfterSales {
 	@ApiModelProperty(value = "退款商品信息")
 	private List<OrderGoodsVO> refundGoodsList;
 
+	@ApiModelProperty(value = "退款商品信息")
+	private List<AfterSalesGoods> afterSalesGoodsList;
+
 	@ApiModelProperty(value = "退款信息")
 	private OrderRefund refund;
 

+ 12 - 0
src/main/java/org/springblade/modules/finance/vo/OrderGoodsVO.java

@@ -19,6 +19,8 @@ package org.springblade.modules.finance.vo;
 import io.swagger.annotations.ApiModelProperty;
 import org.springblade.common.enums.OrderStateEnum;
 import org.springblade.common.enums.PaymentTypeEnum;
+import org.springblade.modules.finance.entity.AfterSales;
+import org.springblade.modules.finance.entity.AfterSalesGoods;
 import org.springblade.modules.finance.entity.OrderGoods;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -26,6 +28,7 @@ import io.swagger.annotations.ApiModel;
 
 import java.math.BigDecimal;
 import java.util.Date;
+import java.util.List;
 
 /**
  * 商品订单表视图实体类
@@ -82,6 +85,15 @@ public class OrderGoodsVO extends OrderGoods {
 	@ApiModelProperty(value = "优惠金额")
 	private BigDecimal discountAmount;
 
+	@ApiModelProperty(value = "是否售后")
+	private Integer isAfterSales;
+
+	@ApiModelProperty(value = "售后实体")
+	private AfterSales afterSales;
+
+	@ApiModelProperty(value = "售后商品")
+	private List<AfterSalesGoods> afterSalesGoodsList;
+
 	public String getPayModeDesc() {
 		return PaymentTypeEnum.getNameByValue(paymentMode);
 	}