编辑角色下文章列表新增字段ai审核内容返回

This commit is contained in:
2025-03-28 15:30:26 +08:00
parent 0aa18858c8
commit 797d8fc5c4

View File

@@ -106,14 +106,6 @@ class Article extends Base
->limit($limit_start, $data['pageSize'])->select();
$count = $this->article_obj->where($where)->count();
//查询AI审核内容 chengxiaoling 20250328 start
$aAiReview = array();
if(!empty($res)){
$aArticleId = array_column($res, 'article_id');
$aAiReview = Db::table('t_article_ai_review')->field('article_id,content')->whereIn('article_id',$aArticleId)->column('article_id,content');
}
//查询AI审核内容 chengxiaoling 20250328 end
foreach ($res as $key => $val) {
//查询建议转投详情
$transfer_info = $this->article_transfer_obj
@@ -138,10 +130,6 @@ class Article extends Base
}
}
$res[$key]['proof'] = $proof_state;
//返回AI审核内容 chengxiaoling 20250328 start
$res[$key]['ai_review'] = empty($aAiReview[$val['article_id']]) ? '' : $aAiReview[$val['article_id']];
//返回AI审核内容 chengxiaoling 20250328 end
}
//返回数据
@@ -354,6 +342,15 @@ class Article extends Base
->order('t_article.article_id desc')
->limit($limit_start, $data['pageSize'])
->select();
//查询AI审核内容 chengxiaoling 20250328 start
$aAiReview = array();
if(!empty($res)){
$aArticleId = array_column($res, 'article_id');
$aAiReview = Db::table('t_article_ai_review')->field('article_id,content')->whereIn('article_id',$aArticleId)->column('article_id,content');
}
//查询AI审核内容 chengxiaoling 20250328 end
//增加审稿意见信息
foreach ($res as $key => $val) {
$cache_review = $this->article_reviewer_obj
@@ -391,6 +388,10 @@ class Article extends Base
$file_frag[$v['type_name']][] = $v;
}
$res[$key]['file'] = $file_frag;
//返回AI审核内容 chengxiaoling 20250328 start
$res[$key]['ai_review'] = empty($aAiReview[$val['article_id']]) ? '' : $aAiReview[$val['article_id']];
//返回AI审核内容 chengxiaoling 20250328 end
}
//添加国家信息