Prechádzať zdrojové kódy

解决重复充值问题

shish 2 rokov pred
rodič
commit
dbfe7e1281
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  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('已提交充值,请60秒后再试');
+            util::fail('已提交充值,请10秒后再试');
             return false;
         }
-        Yii::$app->redis->executeCommand('SETEX', [$cacheKey, 60, 'has']);
+        Yii::$app->redis->executeCommand('SETEX', [$cacheKey, 10, 'has']);
 
         $custom = CustomClass::getLockById($customId);
         if (empty($custom)) {