Explorar el Código

同步物流到微信

xdd hace 8 horas
padre
commit
245697ba48

+ 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){