|
@@ -271,8 +271,7 @@ class CollectorService implements CollectorServiceInterface
|
|
|
*/
|
|
|
public function getOneRule(array $data): array
|
|
|
{
|
|
|
-
|
|
|
- $result = Rule::withCount(relations:'arts')->where('id',$data['id'])->first();
|
|
|
+ $result = Rule::where('id',$data['id'])->first();
|
|
|
if(empty($result)){
|
|
|
return Result::error('请输入正确的规则任务id!');
|
|
|
|
|
@@ -614,9 +613,7 @@ class CollectorService implements CollectorServiceInterface
|
|
|
//跨库查询栏目导航及采集的新闻
|
|
|
$info = Article::query()
|
|
|
->where($where)
|
|
|
- ->with(['category' => function ($query) {
|
|
|
- $query->select('name');
|
|
|
- }])
|
|
|
+ ->with('category')
|
|
|
->orderBy("article.id","desc")
|
|
|
->limit($data['pageSize'])
|
|
|
->offset(($data['page']-1)*$data['pageSize'])->get();
|