This commit is contained in:
wangjinlei
2023-09-13 09:54:10 +08:00
parent 450d961b64
commit 9671bc9229

View File

@@ -1822,8 +1822,13 @@ class Journal extends Controller {
$where_str = '';
if ($data['key1'] == 'author') {
$arts = $this->article_author_obj->where('state', 0)->where('author_name', 'like', '%' . trim($data['val1']) . '%')->column('article_id');
$arts = $this->article_author_obj->where('state', 0)->where('author_name|email', 'like', '%' . trim($data['val1']) . '%')->column('article_id');
$a_str = '(' . implode(',', $arts) . ')';
if($a_str=="()"){
$cre['articles'] = [];
$cre['count'] = 0;
return jsonSuccess($cre);
}
$where_str = '(article_id in ' . $a_str;
} else {
$where_str = '(' . $data['key1'] . ' like "%' . $data['val1'] . '%"';