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