Browse Source

fix: 防止重复支付

xdd 1 month ago
parent
commit
ba11b6f1e4

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

@@ -3591,8 +3591,8 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
             return R.error("订单状态不正确");
         }
 
-        String orderId=redisCache.getCacheObject("isPaying:"+order.getId());
-        if(StringUtils.isNotEmpty(orderId)&&orderId.equals(order.getId().toString())){
+        Object isPaying =redisCache.getCacheObject("isPaying:"+order.getId());
+        if(ObjectUtil.isNotNull(isPaying)){
             return R.error("正在支付中...");
         }
         List<FsStorePayment>  payments=fsStorePaymentMapper.selectFsStorePaymentByOrder(order.getId());