|
|
@@ -411,6 +411,11 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
return R.error("订单状态不正确");
|
|
|
}
|
|
|
|
|
|
+ Object isPaying = redisCache.getCacheObject("isPaying:" + param.getOrderId());
|
|
|
+ if(ObjectUtil.isNotNull(isPaying)) {
|
|
|
+ return R.error("支付中,请稍等...");
|
|
|
+ }
|
|
|
+
|
|
|
FsUser user=userService.selectFsUserById(order.getUserId());
|
|
|
if(user!=null&& StringUtils.isNotEmpty(user.getMaOpenId())){
|
|
|
//已改价处理
|
|
|
@@ -496,6 +501,8 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
}
|
|
|
R process = payment.createOrder(processContext);
|
|
|
if("200".equals(String.valueOf(process.get("code")))){
|
|
|
+ redisCache.setCacheObject("isPaying:"+param.getOrderId(),1,1,TimeUnit.MINUTES);
|
|
|
+
|
|
|
return process;
|
|
|
}
|
|
|
}
|
|
|
@@ -3173,8 +3180,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("正在支付中...");
|
|
|
}
|
|
|
|
|
|
@@ -3582,8 +3589,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());
|