|
|
@@ -331,6 +331,15 @@ class PurchaseOrderController extends BaseController
|
|
|
if (isset($cg->mainId) == false || $cg->mainId != $this->mainId) {
|
|
|
util::fail('请确认是否您的采购单');
|
|
|
}
|
|
|
+
|
|
|
+ //解决重复请求问题
|
|
|
+ $cacheKey = 'confirm_put_in_action_' . $id;
|
|
|
+ $has = Yii::$app->redis->executeCommand('GET', [$cacheKey]);
|
|
|
+ if (!empty($has)) {
|
|
|
+ util::fail('请稍等5秒操作');
|
|
|
+ }
|
|
|
+ Yii::$app->redis->executeCommand('SETEX', [$cacheKey, 5, 'has']);
|
|
|
+
|
|
|
$staff = $this->shopAdmin;
|
|
|
$data = [];
|
|
|
$data['staffId'] = $staff->id ?? 0;
|