|
@@ -3124,6 +3124,13 @@ class NewsService implements NewsServiceInterface
|
|
->offset(($data['page'] - 1) * $data['page_size'])
|
|
->offset(($data['page'] - 1) * $data['page_size'])
|
|
->get();
|
|
->get();
|
|
$count = Good::where($where)
|
|
$count = Good::where($where)
|
|
|
|
+ ->when(!empty($where1), function ($query) use ($where1) {
|
|
|
|
+ return $query->where($where1);
|
|
|
|
+ })
|
|
|
|
+ //status 1待审核2已审核3已拒绝
|
|
|
|
+ ->when(isset($data['status1']), function ($query) {
|
|
|
|
+ return $query->whereIn('good.status', [1, 3]);
|
|
|
|
+ })
|
|
->leftJoin('district', 'good.city_id', '=', 'district.id')
|
|
->leftJoin('district', 'good.city_id', '=', 'district.id')
|
|
->leftJoin('website', 'good.website_id', '=', 'website.id')
|
|
->leftJoin('website', 'good.website_id', '=', 'website.id')
|
|
->leftJoin('category', 'good.catid', '=', 'category.id')
|
|
->leftJoin('category', 'good.catid', '=', 'category.id')
|