This commit is contained in:
wangjinlei
2024-10-16 14:53:44 +08:00
parent 4a84c9f21c
commit 10bdd968af
4 changed files with 87 additions and 7 deletions

View File

@@ -114,25 +114,28 @@ class User extends Base
}
$where = [];
if(isset($data['keywords'])&&$data['keywords']!=''){
$where['email'] = ["like","%".trim($data['keywords'])."%"];
$where['t_article_author.email'] = ["like","%".trim($data['keywords'])."%"];
}else{
$where['email'] = ["<>",""];
$where['t_article_author.email'] = ["<>",""];
}
if(isset($data['doi'])&&$data['doi']!=''){
if(strpos($data['doi'],"10.53388/")){
if(strpos($data['doi'],".53388")){
$doi = substr($data['doi'],9);
}else{
$doi = trim($data['doi']);
}
$p_info = $this->production_article_obj->where("doi",$doi)->where("state",2)->find();
if($p_info&&$p_info['article_id']>0){
$where['article_id'] = $p_info['article_id'];
$where['t_article_author.article_id'] = $p_info['article_id'];
}else{
return jsonError("not find");
}
}
$authors = $this->article_author_obj->where($where)->group("email")->order("art_aut_id desc")->page($data['page'],$data['limit'])->select();
$count = $this->article_author_obj->where($where)->group("email")->order("art_aut_id desc")->count();
if(isset($data['journal_id'])&&$data['journal_id']!=0){
$where['t_article.journal_id'] = $data['journal_id'];
}
$authors = $this->article_author_obj->field("t_article_author.*")->join("t_article","t_article.article_id = t_article_author.article_id","left")->where($where)->group("t_article_author.email")->order("t_article_author.art_aut_id desc")->page($data['page'],$data['limit'])->select();
$count = $this->article_author_obj->join("t_article","t_article.article_id = t_article_author.article_id","left")->where($where)->group("email")->order("art_aut_id desc")->count();
foreach ($authors as $k =>$v){
$articles = $this->article_author_obj
->field("t_article_author.*,t_article.title,t_journal.jabbr journal_jabbr")