Commit 326d2b9e by 张洪旺

fix 循环依赖

parent ebe3c014
...@@ -55,7 +55,6 @@ import static cn.freemud.enums.ResponseResult.*; ...@@ -55,7 +55,6 @@ import static cn.freemud.enums.ResponseResult.*;
@Slf4j @Slf4j
public class FuYouOrderService { public class FuYouOrderService {
private final CashEventProcessor cashEventProcessor;
private final OrderSdkService orderSdkService; private final OrderSdkService orderSdkService;
private final MapperFacade mapperFacade; private final MapperFacade mapperFacade;
private final CouponFeignClient couponFeignClient; private final CouponFeignClient couponFeignClient;
...@@ -63,11 +62,10 @@ public class FuYouOrderService { ...@@ -63,11 +62,10 @@ public class FuYouOrderService {
private final OfflineCouponSdkService offlineCouponSdkService; private final OfflineCouponSdkService offlineCouponSdkService;
private final ScoreFeignClient scoreFeignClient; private final ScoreFeignClient scoreFeignClient;
public FuYouOrderService(CashEventProcessor cashEventProcessor, OrderSdkService orderSdkService, MapperFacade mapperFacade, public FuYouOrderService(OrderSdkService orderSdkService, MapperFacade mapperFacade,
CouponFeignClient couponFeignClient, CouponFeignClient couponFeignClient,
PaymentNewService paymentNewService, OfflineCouponSdkService offlineCouponSdkService, PaymentNewService paymentNewService, OfflineCouponSdkService offlineCouponSdkService,
ScoreFeignClient scoreFeignClient) { ScoreFeignClient scoreFeignClient) {
this.cashEventProcessor = cashEventProcessor;
this.orderSdkService = orderSdkService; this.orderSdkService = orderSdkService;
this.mapperFacade = mapperFacade; this.mapperFacade = mapperFacade;
this.couponFeignClient = couponFeignClient; this.couponFeignClient = couponFeignClient;
...@@ -214,6 +212,13 @@ public class FuYouOrderService { ...@@ -214,6 +212,13 @@ public class FuYouOrderService {
return payorderSeetlment; return payorderSeetlment;
} }
private OrderInfoReqs getOrderByThirdOrderCode(String thirdOrderCode,String orderClient) {
QueryByCodeResponse orderInfo = orderSdkService.getOrderInfo(orderClient,null,thirdOrderCode, null, LogThreadLocal.getTrackingNo());
if (ObjectUtils.notEqual(ResponseConstant.SUCCESS_RESPONSE_CODE, orderInfo.getCode())) {
throw new RuntimeException(orderInfo.getMessage());
}
return orderInfo.getResult();
}
/*** /***
* 支付完成 * 支付完成
...@@ -221,7 +226,7 @@ public class FuYouOrderService { ...@@ -221,7 +226,7 @@ public class FuYouOrderService {
* @return * @return
*/ */
public BaseResponse complete(CompleteRequest request) { public BaseResponse complete(CompleteRequest request) {
OrderInfoReqs orderInfoReqs = cashEventProcessor.getOrderByThirdOrderCode(request.getThirdOrderCode(), request.getOrderClient()); OrderInfoReqs orderInfoReqs = getOrderByThirdOrderCode(request.getThirdOrderCode(), request.getOrderClient());
BaseResponse response = new BaseResponse(); BaseResponse response = new BaseResponse();
if(ObjectUtils.notEqual(PayStatus.HAVE_PAID.getCode(),orderInfoReqs.getPayState())){ if(ObjectUtils.notEqual(PayStatus.HAVE_PAID.getCode(),orderInfoReqs.getPayState())){
return ResponseUtil.error(ORDER_NO_PAU); return ResponseUtil.error(ORDER_NO_PAU);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment