Эх сурвалжийг харах

[智价云] 违规数据处理排序时间更新

tangyuanwang 2 цаг өмнө
parent
commit
f20cf34851

+ 2 - 0
app/Http/Controllers/Manager/Process/LowPriceGoods.php

@@ -197,10 +197,12 @@ class LowPriceGoods extends Controller
             })
                 ->where($map)
                 ->orderByDesc('insert_time')
+                ->orderByDesc('collection_time')
                 ->paginate($limit)->toarray();
         } else {
             $result = $LowPriceGoodsModel->where($map)
                 ->orderByDesc('insert_time')
+                ->orderByDesc('collection_time')
                 ->paginate($limit)->toarray();
         }
         // 分配数据

+ 2 - 0
app/Http/Controllers/Manager/Process/ViolationProduct.php

@@ -197,11 +197,13 @@ class ViolationProduct extends Controller
             })
                 ->where($map)
                 ->orderByDesc('insert_time')
+                ->orderByDesc('collection_time')
                 ->paginate($limit)->toarray();
         } else {
             $result = $ViolationProductModel
                 ->where($map)
                 ->orderByDesc('insert_time')
+                ->orderByDesc('collection_time')
                 ->paginate($limit)->toarray();
         }
         // 分配数据

+ 2 - 0
app/Http/Controllers/Manager/Process/ViolationStore.php

@@ -159,11 +159,13 @@ class ViolationStore extends Controller
             })
                 ->where($map)
                 ->orderByDesc('insert_time')
+                ->orderByDesc('collection_time')
                 ->paginate($limit)->toarray();
         } else {
             $result = $ViolationStoreModel
                 ->where($map)
                 ->orderByDesc('insert_time')
+                ->orderByDesc('collection_time')
                 ->paginate($limit)->toarray();
         }
         // 分配数据

+ 1 - 1
app/Jobs/Manager/Other/ExportLowPriceGoodsJobs.php

@@ -241,7 +241,7 @@ class ExportLowPriceGoodsJobs implements ShouldQueue
             });
         }
 
-        $query->orderByDesc('id')
+        $query->orderByDesc('insert_time')->orderByDesc('collection_time')
             ->chunkById($limit, function ($rows) use ($key_name) {
                 $result_data = $rows->toArray();
                 if (empty($result_data)) {

+ 1 - 1
app/Jobs/Manager/Other/ExportViolationProductJobs.php

@@ -237,7 +237,7 @@ class ExportViolationProductJobs implements ShouldQueue
                     ->orWhere('source_responsible_person', 'like', "%,$user_id,%");
             });
         }
-        $query->orderByDesc('id')
+        $query->orderByDesc('insert_time')->orderByDesc('collection_time')
             ->chunkById($limit, function ($rows) use ($key_name) {
                 $result_data = $rows->toArray();
                 if (empty($result_data)) {