|
|
@@ -259,6 +259,10 @@ class LowPriceGoods extends Controller
|
|
|
$low_price_goods_where['company_id'] = $message_data['admin_company_id'];
|
|
|
}
|
|
|
|
|
|
+ $key_name = 'ExportLowPriceGoodsJobs_' . $low_price_goods_where['company_id'];
|
|
|
+ $export_data_info = Cache::get($key_name);
|
|
|
+ if ($export_data_info) return json_send(['code' => 'fail', 'msg' => '导出任务正在执行中,请稍后再试', 'data' => '']);
|
|
|
+
|
|
|
// 查询条件
|
|
|
$map = [];
|
|
|
$job_page = isset($message_data['job_page']) ? $message_data['job_page'] : 1;
|
|
|
@@ -407,9 +411,8 @@ class LowPriceGoods extends Controller
|
|
|
if ($result_count > 150000) return json_send(['code' => 'fail', 'msg' => '导出数据超过15万条,请缩小导出范围后再试', 'data' => '']);
|
|
|
|
|
|
$key_name = 'ExportLowPriceGoodsJobs_' . $low_price_goods_where['company_id'];
|
|
|
- $export_data_info = Cache::get($key_name);
|
|
|
- if ($export_data_info) return json_send(['code' => 'fail', 'msg' => '导出任务正在执行中,请稍后再试', 'data' => '']);
|
|
|
-
|
|
|
+ //创建缓存
|
|
|
+ Cache::put($key_name, [], 60 * 60 * 24);
|
|
|
// 生成唯一文件ID
|
|
|
$fileId = make_snow_flake();
|
|
|
$message_data['file_id'] = $fileId;
|