diff --git a/app/Service/v3/Implementations/ActivityService.php b/app/Service/v3/Implementations/ActivityService.php index eafe022..0a73a61 100644 --- a/app/Service/v3/Implementations/ActivityService.php +++ b/app/Service/v3/Implementations/ActivityService.php @@ -50,11 +50,13 @@ class ActivityService implements ActivityServiceInterface ->where(function ($query) { $query->where('time2', '>=', date('H:i')) ->orWhere('time4', '>=', date('H:i')); - }); + }) + ->where(''.$goodsTable.'.expire_time', '>', time()); return $builder->select(''.$goodsTable.'.*')->addSelect(''.$goodsTable.'.sales as total_sales') ->orderBy(''.$goodsTable.'.sort', 'DESC') ->orderBy(''.$goodsTable.'.expire_time', 'ASC') + ->orderBy(''.$goodsTable.'.created_at', 'DESC') ->get()->toArray(); } } \ No newline at end of file