shish 2 vuotta sitten
vanhempi
commit
97fe8b0a05
1 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 3 3
      app-ghs/controllers/OrderController.php

+ 3 - 3
app-ghs/controllers/OrderController.php

@@ -844,13 +844,13 @@ class OrderController extends BaseController
             util::fail('请选客户哦');
         }
 
-        //4秒内不允许重复提交
+        //n秒内不允许重复提交
         $cacheKey = 'ghs_custom_create_order_' . $customId;
         $has = Yii::$app->redis->executeCommand('GET', [$cacheKey]);
         if (!empty($has)) {
-            util::fail('请勿重复提交');
+            util::fail('操作频繁,5秒后再试');
         }
-        Yii::$app->redis->executeCommand('SETEX', [$cacheKey, 4, 'has']);
+        Yii::$app->redis->executeCommand('SETEX', [$cacheKey, 5, 'has']);
 
         CustomClass::valid($custom, $this->shopId);
         if (isset($custom['mainId']) && !empty($custom['mainId']) && $custom['mainId'] == $custom['ownMainId']) {