Explorar o código

解决重复操作问题

shish %!s(int64=2) %!d(string=hai) anos
pai
achega
5019e571d6
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      app-ghs/controllers/CustomController.php

+ 2 - 2
app-ghs/controllers/CustomController.php

@@ -98,10 +98,10 @@ class CustomController extends BaseController
         $cacheKey = 'help_custom_recharge_' . $customId;
         $has = Yii::$app->redis->executeCommand('GET', [$cacheKey]);
         if (!empty($has)) {
-            util::fail('已提交充值,请10秒后再试');
+            util::fail('已充值,请15秒后再操作');
             return false;
         }
-        Yii::$app->redis->executeCommand('SETEX', [$cacheKey, 10, 'has']);
+        Yii::$app->redis->executeCommand('SETEX', [$cacheKey, 15, 'has']);
 
         $custom = CustomClass::getLockById($customId);
         if (empty($custom)) {