shish 2 سال پیش
والد
کامیت
9c6893fb8a
1فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 4 4
      app-ghs/controllers/OrderController.php

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

@@ -843,9 +843,12 @@ class OrderController extends BaseController
         if (empty($custom)) {
             util::fail('请选客户哦');
         }
+        $shopAdmin = $this->shopAdmin;
+        $shopAdminId = $this->shopAdminId;
+        $shopAdminName = $shopAdmin->name ?? '';
 
         //n秒内不允许重复提交
-        $cacheKey = 'ghs_custom_create_order_' . $customId;
+        $cacheKey = 'ghs_custom_create_order_' . $customId . '_' . $shopAdminId;
         $has = Yii::$app->redis->executeCommand('GET', [$cacheKey]);
         if (!empty($has)) {
             util::fail('操作频繁,5秒后再试');
@@ -871,9 +874,6 @@ class OrderController extends BaseController
         $post['showAddress'] = $custom['showAddress'] ?? '';
         $post['long'] = $custom['long'] ?? '';
         $post['lat'] = $custom['lat'] ?? '';
-        $shopAdmin = $this->shopAdmin;
-        $shopAdminId = $this->shopAdminId;
-        $shopAdminName = $shopAdmin->name ?? '';
         if (isset($post['getStaffId']) == true && !empty($post['getStaffId'])) {
             $getStaffName = $post['getStaffName'] ?? '';
             $shopAdminId = $post['getStaffId'];