Browse Source

解决重复操作问题

shish 2 năm trước cách đây
mục cha
commit
5019e571d6
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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)) {