|
|
@@ -32,7 +32,6 @@ import com.ylx.massage.service.TWxUserService;
|
|
|
import com.ylx.massage.utils.OrderNumberGenerator;
|
|
|
import com.ylx.message.enums.TriggerEventEnum;
|
|
|
import com.ylx.message.service.IMessageService;
|
|
|
-import com.ylx.order.domain.AfterSalesService;
|
|
|
import com.ylx.order.domain.OrderStatusFlow;
|
|
|
import com.ylx.order.domain.TOrder;
|
|
|
import com.ylx.order.domain.dto.*;
|
|
|
@@ -43,7 +42,10 @@ import com.ylx.order.domain.vo.merchant.OrderCustomerPhoneVO;
|
|
|
import com.ylx.order.domain.vo.merchant.OrderPageVO;
|
|
|
import com.ylx.order.enums.*;
|
|
|
import com.ylx.order.mapper.TOrderMapper;
|
|
|
-import com.ylx.order.service.*;
|
|
|
+import com.ylx.order.service.IAfterSalesServiceService;
|
|
|
+import com.ylx.order.service.IGeoRiskInfo;
|
|
|
+import com.ylx.order.service.OrderStatusFlowService;
|
|
|
+import com.ylx.order.service.TOrderService;
|
|
|
import com.ylx.project.domain.Project;
|
|
|
import com.ylx.project.service.ProjectService;
|
|
|
import com.ylx.shopingfundsdetail.domain.vo.ShoppingFundsDetailAddDto;
|
|
|
@@ -348,7 +350,7 @@ public class TOrderServiceImpl extends BaseServiceImpl<TOrderMapper, TOrder> imp
|
|
|
vo.setServiceTime(serviceTime);
|
|
|
|
|
|
// 获取订单售后数据
|
|
|
- this.fillCurrentAfterSaleInfo(vo, order.getId());
|
|
|
+ this.afterSalesServiceService.fillCurrentAfterSaleInfo(vo, order.getId());
|
|
|
|
|
|
return vo;
|
|
|
}
|
|
|
@@ -573,7 +575,7 @@ public class TOrderServiceImpl extends BaseServiceImpl<TOrderMapper, TOrder> imp
|
|
|
vo.setPaymentMethodName(PaymentMethodEnum.getNameByCode(order.getPaymentMethod()));
|
|
|
|
|
|
// 获取订单售后数据
|
|
|
- this.fillCurrentAfterSaleInfo(vo, order.getId());
|
|
|
+ this.afterSalesServiceService.fillCurrentAfterSaleInfo(vo, order.getId());
|
|
|
|
|
|
// 订单状态流转列表转换
|
|
|
List<OrderStatusFlowVO> flowVOList = flowList.stream().map(this::convertToFlowVO).sorted(Comparator.comparing(OrderStatusFlowVO::getCreateTime)).collect(Collectors.toList());
|
|
|
@@ -742,7 +744,7 @@ public class TOrderServiceImpl extends BaseServiceImpl<TOrderMapper, TOrder> imp
|
|
|
vo.setCustomerTagDesc(CustomerTagEnum.getDescByCode(tagCode));
|
|
|
vo.setAppointmentTimeRange(formatTimeRange(vo.getAppointmentStartTime(), vo.getProjectDuration()));
|
|
|
|
|
|
- this.fillCurrentAfterSaleInfo(vo, vo.getId());
|
|
|
+ this.afterSalesServiceService.fillCurrentAfterSaleInfo(vo, vo.getId());
|
|
|
}
|
|
|
|
|
|
return page;
|
|
|
@@ -1082,7 +1084,7 @@ public class TOrderServiceImpl extends BaseServiceImpl<TOrderMapper, TOrder> imp
|
|
|
List<TGeoFence> usableFence = filterUsableFence(validFenceList);
|
|
|
|
|
|
// 5. 查询关联的售后信息 (如果有)
|
|
|
- fillCurrentAfterSaleInfo(vo, order.getId());
|
|
|
+ this.afterSalesServiceService.fillCurrentAfterSaleInfo(vo, order.getId());
|
|
|
|
|
|
// 6. 计算高风险围栏信息
|
|
|
calcOrderGeoFenceInfo(vo, usableFence);
|
|
|
@@ -1187,27 +1189,6 @@ public class TOrderServiceImpl extends BaseServiceImpl<TOrderMapper, TOrder> imp
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
- private void fillCurrentAfterSaleInfo(IAfterSaleDisplay vo, Long orderId) {
|
|
|
- LambdaQueryWrapper<AfterSalesService> wrapper = new LambdaQueryWrapper<>();
|
|
|
- wrapper.eq(AfterSalesService::getOrderId, orderId).orderByDesc(AfterSalesService::getCreateTime).last("LIMIT 1");
|
|
|
-
|
|
|
- AfterSalesService afterSalesService = this.afterSalesServiceService.getOne(wrapper);
|
|
|
- if (ObjectUtil.isNull(afterSalesService)) {
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- vo.setAfterSalesServiceId(afterSalesService.getId());
|
|
|
- Integer statusCode = afterSalesService.getStatus();
|
|
|
- if (ObjectUtil.isNotNull(statusCode)) {
|
|
|
- AfterSaleServiceStatusEnum statusEnum = AfterSaleServiceStatusEnum.valueOf(statusCode);
|
|
|
- vo.setAfterSalesServiceStatus(ObjectUtil.isNotNull(statusEnum) ? statusEnum.getDesc() : "未知状态");
|
|
|
- } else {
|
|
|
- vo.setAfterSalesServiceStatus("未知状态");
|
|
|
- }
|
|
|
- vo.setActualRefundAmount(afterSalesService.getActualRefundAmount());
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 根据单位类型将时长转换为分钟
|
|
|
*
|