소스 검색

同步物流到微信

xdd 1 개월 전
부모
커밋
245697ba48
1개의 변경된 파일13개의 추가작업 그리고 4개의 파일을 삭제
  1. 13 4
      fs-service-system/src/main/java/com/fs/store/service/impl/FsStoreOrderServiceImpl.java

+ 13 - 4
fs-service-system/src/main/java/com/fs/store/service/impl/FsStoreOrderServiceImpl.java

@@ -277,13 +277,22 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
             OrderKey orderKey = new OrderKey();
             orderKey.setOrderNumberType(2);
 
-            FsStorePayment fsStorePayment = paymentService.selectFsStorePaymentByCode(fsWxExpressTask.getPayCode());
-            if(fsStorePayment != null){
-                orderKey.setTransactionId(fsStorePayment.getBankTransactionId());
-            }
+
 
             FsUser fsUser = fsUserCacheService.selectFsUserById(fsWxExpressTask.getUserId());
             FsStoreOrder fsStoreOrder = fsStoreOrderMapper.selectFsStoreOrderByOrderCode(fsWxExpressTask.getOrderCode());
+
+
+            if(ObjectUtil.isNotNull(fsStoreOrder)){
+                List<FsStorePayment> fsStorePayments = paymentService.selectFsStorePaymentByOrder(fsStoreOrder.getId());
+
+
+                if(CollectionUtils.isNotEmpty(fsStorePayments)){
+                    FsStorePayment fsStorePayment = fsStorePayments.get(0);
+                    orderKey.setTransactionId(fsStorePayment.getBankTransactionId());
+                }
+            }
+
             String userPhone = "";
             String orderGoodsInfo = "商品";
             if(fsStoreOrder != null){