Browse Source

2秒内不能重复请求

shish 9 hours ago
parent
commit
0accd7956c
1 changed files with 2 additions and 1 deletions
  1. 2 1
      app-ghs/controllers/OrderController.php

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

@@ -2678,6 +2678,7 @@ class OrderController extends BaseController
         if (isset($ext->printSn) == false || isset($ext->printKey) == false || empty($ext->printSn) || empty($ext->printKey)) {
             util::success(['hasNoPrint' => 1]);
         }
+        util::checkRepeatCommit($this->adminId, 2);
         OrderClass::onlinePrint($order, $showPrice);
         $order->printNum += 1;
         $order->save();
@@ -2842,7 +2843,7 @@ class OrderController extends BaseController
                             //返回禁止关单
                             util::fail('取消失败,如必要请强制取消');
                         }
-                    }else{
+                    } else {
                         noticeUtil::push("关单成功,订单号:{$orderSn} 原单状态:{$tradeState}", '15280215347');
                     }
                 }