小bug调整

This commit is contained in:
wangjinlei
2025-05-16 15:34:04 +08:00
parent 65e0f5ccc8
commit a5f6ec2dca
3 changed files with 16 additions and 9 deletions

View File

@@ -492,7 +492,7 @@ class Article extends Controller
//处理话题,相关文章
if (isset($data['related'])&&$data['related']!=""){
$insert['related'] = $data['related'];
$insert['related'] = json_encode(object_to_array(json_decode($data['related'])));
}
$insert['sort'] = $sort;
@@ -530,6 +530,8 @@ class Article extends Controller
$author_res = true;
$ato_res = true;
$ca_au_id = true;
foreach ($authors as $v) {
$insert_author['article_id'] = $aid;
$insert_author['author_name'] = $journal_info['journal_id'] == 22 ? $v['last_name'] . $v['first_name'] : $v['first_name'] . ' ' . $v['last_name'];
@@ -560,17 +562,17 @@ class Article extends Controller
return jsonError($e->getMessage());
}
//处理话题,相关文章
if (isset($data['topics'])&&$data['topics']!=""){
$ll = json_decode($data['topics']);
$ll = object_to_array(json_decode($data['topics']));
foreach ($ll as $v){
$cac_topic['article_id'] = $aid;
$cac_topic['topic_id'] = $v;
$this->journal_topic_obj->insert($cac_topic);
$this->article_to_topic_obj->insert($cac_topic);
}
}
if ($aid && $organ_res && $ltai_res && $author_res && $ato_res && $ca_au_id) {
Db::commit();
$this->pushDoiToCrossref($data['doi'], $aid);