From 16c2d638489e4018849fd2e937e10f455c286ce1 Mon Sep 17 00:00:00 2001 From: wangjinlei <751475802@qq.com> Date: Thu, 23 Jul 2026 13:38:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=B7=E6=A0=BC=E5=8F=98=E5=8A=A8=E5=90=8E?= =?UTF-8?q?=E5=8F=91=E9=80=81=E5=90=88=E9=80=82=E7=9A=84=E9=82=AE=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/controller/Order.php | 76 +++++++++++++++++++++++++++- 1 file changed, 75 insertions(+), 1 deletion(-) diff --git a/application/api/controller/Order.php b/application/api/controller/Order.php index 66897fee..d5024f07 100644 --- a/application/api/controller/Order.php +++ b/application/api/controller/Order.php @@ -306,6 +306,8 @@ WHERE apa.state = ".$data['state']; } $apply_info = Db::name("article_price_apply")->where("id",$data['id'])->find(); + $old_article_info = $this->article_obj->where("article_id",$apply_info['article_id'])->find(); + $journal_info = $this->journal_obj->where("journal_id",$old_article_info['journal_id'])->find(); $article_update['fee']=$apply_info['fee']; $article_update['fee_remark']=$apply_info['remark']; @@ -326,6 +328,52 @@ WHERE apa.state = ".$data['state']; } } + //发送邮件,提醒给作者 + $user_info = $this->user_obj->where("user_id",$old_article_info['user_id'])->find(); + $email[] = $user_info['email']; + $authors = $this->article_author_obj->where("article_id",$apply_info['article_id'])->where("state",0)->where("is_report",1)->select(); + foreach ($authors as $v){ + if(in_array($v['email'],$email)){ + continue; + } + $email[] = $v['email']; + } + + $tt = 'Dear Authors,


'; + $tt .= "We are pleased to inform you that your manuscript has successfully completed the editorial evaluation process and has been pre-accepted, pending the completion of the remaining publication procedures.

"; + $tt .= "Manuscript Title: ".$old_article_info['title']."
"; + $tt .= "Article SN:".$old_article_info['accept_sn']."

"; + $tt .= "As part of the journal's publication support program, we are delighted to notify you that your application for an Article Processing Charge (APC) benefit has been approved.

"; + $tt .= "Publication Fee Summary

"; + $tt .= "Standard APC: USD $".$old_article_info['fee']."
"; + if($apply_info['fee']==0){ + $tt .= "Approved APC Benefit:Full Waiver"; + } + $tt .= "Discounted APC: USD ".$apply_info['fee']."

"; + $tt .= "Please note that this APC waiver/discount has been granted as a publication benefit and does not affect the journal's editorial standards. Your manuscript has been evaluated according to the same editorial and peer-review criteria applied to all submissions.
"; + $tt .= "The Editorial Office will contact you shortly regarding the remaining publication procedures, including proofreading, copyright documentation (if applicable), and production scheduling.

"; + $tt .= "Congratulations on your successful submission, and thank you for choosing Medical Data Mining. We look forward to publishing your valuable work.
"; + $tt .= "Should you have any questions, please feel free to contact us.
"; + $tt .= "Kind regards,
Editorial Office
".$journal_info['title']; + + foreach ($email as $v){ + sendEmail($v, "tmr-".$old_article_info['accept_sn']."-price approval", $journal_info['title'], $tt, $journal_info['email'], $journal_info['epassword']); + } + + //发送邮件给编辑 + $editor = $this->user_obj->where("user_id",$journal_info['editor_id'])->find(); + $tt = 'Dear Editor,


'; + $tt .= "This email is to inform you of the outcome of the Article Processing Charge (APC) adjustment application for the following manuscript.

"; + $tt .= "Manuscript Information

"; + $tt .= "Title: ".$old_article_info['title']."
"; + $tt .= "Article SN:".$old_article_info['accept_sn']."

"; + $tt .= "APC Information

"; + $tt .= "Standard APC: USD $".$old_article_info['fee']."
"; + $tt .= "Applied APC: USD $".$apply_info['fee']."

"; + $tt .= "The APC adjustment application has been approved. The manuscript will proceed with an APC of USD $".$apply_info['fee']." in accordance with the approved decision."; + + sendEmail($editor['email'], "tmr-".$old_article_info['accept_sn']."-price approval", $journal_info['title'], $tt, $journal_info['email'], $journal_info['epassword']); + return jsonSuccess(); } @@ -353,8 +401,34 @@ WHERE apa.state = ".$data['state']; if(!$rule->check($data)){ return jsonError($rule->getError()); } -// $apply_info = Db::name("article_price_apply")->where("id",$data['id'])->find(); + $apply_info = Db::name("article_price_apply")->where("id",$data['id'])->find(); + $article_info = $this->article_obj->where("article_id",$apply_info['article_id'])->find(); + $journal_info = $this->journal_obj->where("journal_id",$article_info['journal_id'])->find(); + + Db::name("article_price_apply")->where("id",$data['id'])->update(['state'=>2,"remark"=>trim($data['remark'])]); + + //发送邮件给编辑 + $editor = $this->user_obj->where("user_id",$journal_info['editor_id'])->find(); + $tt = 'Dear Editor,


'; + $tt .= "This email is to inform you of the outcome of the Article Processing Charge (APC) adjustment application for the following manuscript.

"; + $tt .= "Manuscript Information

"; + $tt .= "Title: ".$article_info['title']."
"; + $tt .= "Article SN:".$article_info['accept_sn']."

"; + $tt .= "APC Information

"; + $tt .= "Standard APC: USD $".$article_info['fee']."
"; + $tt .= "Applied APC: USD $".$apply_info['fee']."

"; + $tt .= "The APC adjustment application has been rejected.

"; + $tt .= "Reason for Rejection:
"; + $tt .= $apply_info['remark']."

"; + $tt .= "No changes will be made to the publication fee, and the manuscript will remain subject to the standard APC of USD $".$article_info['fee'].".
"; + + sendEmail($editor['email'], "tmr-".$article_info['accept_sn']."-price rejected", $journal_info['title'], $tt, $journal_info['email'], $journal_info['epassword']); + + + + + return jsonSuccess(); }