shish 4 năm trước cách đây
mục cha
commit
e2f25963cb

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

@@ -700,14 +700,14 @@ class OrderController extends BaseController
             util::fail('请选择客户');
             util::fail('请选择客户');
         }
         }
 
 
-        //5秒内不允许重复开单
+        //4秒内不允许重复开单
         $staffId = $this->shopAdminId ?? 0;
         $staffId = $this->shopAdminId ?? 0;
         $cacheKey = 'ghs_create_order_' . $staffId . '_' . $customId;
         $cacheKey = 'ghs_create_order_' . $staffId . '_' . $customId;
         $has = Yii::$app->redis->executeCommand('GET', [$cacheKey]);
         $has = Yii::$app->redis->executeCommand('GET', [$cacheKey]);
         if (!empty($has)) {
         if (!empty($has)) {
             util::fail('请稍等');
             util::fail('请稍等');
         }
         }
-        Yii::$app->redis->executeCommand('SETEX', [$cacheKey, 5, 'has']);
+        Yii::$app->redis->executeCommand('SETEX', [$cacheKey, 4, 'has']);
 
 
         $custom = CustomClass::getCustom($customId);
         $custom = CustomClass::getCustom($customId);
         if (empty($custom)) {
         if (empty($custom)) {