|
|
@@ -285,7 +285,12 @@ class ExportViolationProductJobs implements ShouldQueue
|
|
|
$select_product_datas = $this->processing_responsible_person($select_product_datas, $member_list);
|
|
|
//如果查询完毕了,则直接处理//合并数据
|
|
|
$product_datas = array_merge($select_product_datas, $cache_product_datas);
|
|
|
- Cache::put($key_name, $product_datas, 600); //缓存10分钟
|
|
|
+ // 转为集合并排序
|
|
|
+ $collection = collect($product_datas);
|
|
|
+ $sorted = $collection->sortByDesc(function ($item) {
|
|
|
+ return $item['insert_time'] . '|' . $item['collection_time'];
|
|
|
+ })->values()->toArray();
|
|
|
+ Cache::put($key_name, $sorted, 600); //缓存10分钟
|
|
|
Cache::put($key_task_name,'1', 600); //缓存10分钟
|
|
|
if ($page < $last_page) {
|
|
|
//继续执行下一页
|