|
@@ -95,6 +95,7 @@ class WebService implements WebServiceInterface
|
|
|
// 以下注释掉的代码是之前的逻辑,用于获取非顶级分类的 pid
|
|
// 以下注释掉的代码是之前的逻辑,用于获取非顶级分类的 pid
|
|
|
$pidQuery = WebsiteCategory::where($website_id)
|
|
$pidQuery = WebsiteCategory::where($website_id)
|
|
|
->where('pid', '!=', 0)
|
|
->where('pid', '!=', 0)
|
|
|
|
|
+ ->where('type','!=',8)
|
|
|
->orderBy('sort')
|
|
->orderBy('sort')
|
|
|
->select('pid', 'category_id', 'alias', 'aLIas_pinyin');
|
|
->select('pid', 'category_id', 'alias', 'aLIas_pinyin');
|
|
|
$pid = $pidQuery->pluck('pid');
|
|
$pid = $pidQuery->pluck('pid');
|
|
@@ -107,6 +108,7 @@ class WebService implements WebServiceInterface
|
|
|
->when(in_array(3, $website_column_arr) || $data['pid'] != 0, function ($query) use ($data) {
|
|
->when(in_array(3, $website_column_arr) || $data['pid'] != 0, function ($query) use ($data) {
|
|
|
$query->where('pid', $data['pid']);
|
|
$query->where('pid', $data['pid']);
|
|
|
})
|
|
})
|
|
|
|
|
+ ->where('type','!=',8)
|
|
|
->offset($data['placeid'])
|
|
->offset($data['placeid'])
|
|
|
->limit($data['num'])
|
|
->limit($data['num'])
|
|
|
->orderBy('sort')
|
|
->orderBy('sort')
|
|
@@ -3920,4 +3922,25 @@ class WebService implements WebServiceInterface
|
|
|
}
|
|
}
|
|
|
return Result::success($result);
|
|
return Result::success($result);
|
|
|
}
|
|
}
|
|
|
|
|
+ public function processWebColumn(): array
|
|
|
|
|
+ {
|
|
|
|
|
+ $pidQuery = WebsiteColumn::where('column_name','==','官网')
|
|
|
|
|
+ ->where('pid', '!=', 0)
|
|
|
|
|
+ ->where('type','!=',8)
|
|
|
|
|
+ ->orderBy('sort')
|
|
|
|
|
+ ->select('pid', 'category_id', 'alias', 'aLIas_pinyin');
|
|
|
|
|
+ $pid = $pidQuery->pluck('pid');
|
|
|
|
|
+ $query = WebsiteCategory::where($website_id)
|
|
|
|
|
+ ->where('type','!=',8)
|
|
|
|
|
+ ->where('pid', $pid)
|
|
|
|
|
+ ->offset($data['placeid'])
|
|
|
|
|
+ ->limit($data['num'])
|
|
|
|
|
+ ->orderBy('sort')
|
|
|
|
|
+ ->orderBy('updated_at', 'desc');
|
|
|
|
|
+ $result = $query->get()->all();
|
|
|
|
|
+ if (empty($result)) {
|
|
|
|
|
+ return Result::error("暂无相关分类信息", 0);
|
|
|
|
|
+ }
|
|
|
|
|
+ return Result::success($result);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|