Kaynağa Gözat

fix: 订单取消查询一次台州银行

xdd 1 hafta önce
ebeveyn
işleme
9a0b7e7577

+ 2 - 0
fs-service-system/src/main/java/com/fs/store/mapper/FsStorePaymentMapper.java

@@ -277,6 +277,8 @@ public interface FsStorePaymentMapper
 
     @Select("select * from fs_store_payment where business_type=2 and order_id=#{orderId} and status=1 limit 1")
     List<FsStorePayment> selectFsStorePaymentByOrderId(Long orderId);
+    @Select("select * from fs_store_payment where business_type=2 and order_id=#{orderId} limit 1")
+    List<FsStorePayment> selectFsStorePaymentByOrderIdNew(Long orderId);
 
     @Select({"<script> " +
             "select count(1) from fs_store_payment  " +

+ 1 - 0
fs-service-system/src/main/java/com/fs/store/service/IFsStorePaymentService.java

@@ -84,6 +84,7 @@ public interface IFsStorePaymentService
 
 
     List<FsStorePayment> selectFsStorePaymentByOrderId(Long orderId);
+    List<FsStorePayment> selectFsStorePaymentByOrderIdNew(Long orderId);
     Integer selectFsStorePaymentByOrderIdExists(Long orderId);
 
     Long selectFsStorePaymentCount(int type,Long companyId);

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

@@ -295,7 +295,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
             if(order.getPayType().equals("1")||order.getPayType().equals("2")){
                 String json = configService.selectConfigByKey("store.pay");
                 FsPayConfig fsPayConfig = JSON.parseObject(json, FsPayConfig.class);
-                List<FsStorePayment> fsStorePayments = fsStorePaymentMapper.selectFsStorePaymentByOrderId(order.getId());
+                List<FsStorePayment> fsStorePayments = fsStorePaymentMapper.selectFsStorePaymentByOrderIdNew(order.getId());
                 FsStorePayment storePayment;
                 if(CollectionUtils.isEmpty(fsStorePayments)){
                     storePayment=new FsStorePayment();
@@ -2922,7 +2922,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
             String payCode = IdUtil.getSnowflake(0, 0).nextIdStr();
             String json = configService.selectConfigByKey("store.pay");
             FsPayConfig fsPayConfig = JSON.parseObject(json, FsPayConfig.class);
-            List<FsStorePayment> fsStorePayments = fsStorePaymentMapper.selectFsStorePaymentByOrderId(order.getId());
+            List<FsStorePayment> fsStorePayments = fsStorePaymentMapper.selectFsStorePaymentByOrderIdNew(order.getId());
 
             FsStorePayment storePayment;
             if(CollectionUtils.isEmpty(fsStorePayments)){

+ 6 - 0
fs-service-system/src/main/java/com/fs/store/service/impl/FsStorePaymentServiceImpl.java

@@ -1,6 +1,7 @@
 package com.fs.store.service.impl;
 
 import java.math.BigDecimal;
+import java.util.Collections;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
@@ -231,6 +232,11 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService
         return fsStorePaymentMapper.selectFsStorePaymentByOrderId(orderId);
     }
 
+    @Override
+    public List<FsStorePayment> selectFsStorePaymentByOrderIdNew(Long orderId) {
+        return fsStorePaymentMapper.selectFsStorePaymentByOrderIdNew(orderId);
+    }
+
     @Override
     public Integer selectFsStorePaymentByOrderIdExists(Long orderId) {
         return fsStorePaymentMapper.selectFsStorePaymentByOrderIdExists(orderId);

+ 1 - 1
fs-user-app/src/main/java/com/fs/app/controller/StoreOrderController.java

@@ -203,7 +203,7 @@ public class StoreOrderController extends  AppBaseController {
         if (order.getStatus() !=0) {
             throw new CustomException("非法操作");
         }
-        List<FsStorePayment> fsStorePayments = fsStorePaymentService.selectFsStorePaymentByOrderId(order.getId());
+        List<FsStorePayment> fsStorePayments = fsStorePaymentService.selectFsStorePaymentByOrderIdNew(order.getId());
         if(CollectionUtils.isNotEmpty(fsStorePayments)){
             FsStorePayment fsStorePayment = fsStorePayments.get(0);
             if(fsStorePaymentService.queryTzbk(fsStorePayment)){