1
This commit is contained in:
@@ -247,6 +247,9 @@ class User extends Base
|
||||
$ca_arr[] = $c;
|
||||
}
|
||||
$list[$k]['sd'] = $ca_arr;
|
||||
//增加发文量和审稿量字段
|
||||
// $this->article_obj->where('user_id',$v['user_id'])->where('state')
|
||||
|
||||
}
|
||||
$count = $this->user_to_yboard_obj->join("t_user",'t_user.user_id = t_user_to_yboard.user_id','left')->join("t_user_reviewer_info",'t_user_reviewer_info.reviewer_id = t_user.user_id','left')->where($where)->count();
|
||||
$re['yboards'] = $list;
|
||||
@@ -418,6 +421,9 @@ class User extends Base
|
||||
if(isset($data['keywords'])&&trim($data['keywords'])!=''){
|
||||
$where['t_user.account|t_user.email|t_user.realname'] = ['like',"%".trim($data['keywords'])."%"];
|
||||
}
|
||||
if(isset($data['year'])&&$data['year']!=0){
|
||||
$where['t_user_author.stage_year'] = $data['year'];
|
||||
}
|
||||
$list = $this->user_author_obj
|
||||
->join([['t_user','t_user.user_id = t_user_author.user_id','left'],['t_user_reviewer_info','t_user_reviewer_info.reviewer_id=t_user.user_id','left']])
|
||||
->where($where)
|
||||
@@ -834,13 +840,24 @@ class User extends Base
|
||||
public function getUserBlackList()
|
||||
{
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
'pageIndex'=>'require',
|
||||
'pageSize'=>'require'
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$where['t_user_black.black_state'] = 0;
|
||||
if(isset($data['keywords'])&&trim($data['keywords'])!=''){
|
||||
$where["t_user.account|t_user.realname|t_user.email"] = ["like","%".trim($data['keywords'])."%"];
|
||||
}
|
||||
$limit_start = ($data['pageIndex'] - 1) * $data['pageSize'];
|
||||
$list = $this->user_black_obj
|
||||
->field("t_user.account,t_user.email,t_user.realname,t_user_black.*")
|
||||
->join('t_user', 't_user.user_id = t_user_black.user_id', 'left')
|
||||
->where('t_user_black.black_state', 0)
|
||||
->where($where)
|
||||
->limit($limit_start, $data['pageSize'])->select();
|
||||
$count = $this->user_black_obj->where('black_state', 0)->count();
|
||||
$count = $this->user_black_obj->join('t_user', 't_user.user_id = t_user_black.user_id', 'left')->where($where)->count();
|
||||
$re['blacks'] = $list;
|
||||
$re['count'] = $count;
|
||||
return jsonSuccess($re);
|
||||
@@ -886,14 +903,37 @@ class User extends Base
|
||||
}
|
||||
$ids = $this->journal_obj->where('editor_id',$data['editor_id'])->column('journal_id');
|
||||
$list = $this->apply_yboard_obj
|
||||
->field("t_journal.title,t_apply_yboard.*,t_user.account,t_user.email,t_user.realname")
|
||||
->field("t_journal.title ,t_apply_yboard.*,t_apply_yboard.ctime ap_time,t_user.*,t_user_reviewer_info.*")
|
||||
->join("t_journal",'t_journal.journal_id = t_apply_yboard.journal_id','left')
|
||||
->join("t_user","t_user.user_id = t_apply_yboard.user_id",'left')
|
||||
->join("t_user_reviewer_info","t_user_reviewer_info.reviewer_id = t_user.user_id",'left')
|
||||
->where('t_apply_yboard.journal_id','in',$ids)->where('t_apply_yboard.state',0)->select();
|
||||
foreach($list as $k => $v){//补充简历信息
|
||||
$cac = $this->user_cv_obj->where('user_id',$v['user_id'])->where('state',0)->select();
|
||||
$list[$k]['cvs'] = $cac;
|
||||
}
|
||||
$re['applys'] = $list;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户列表为了发送邮件
|
||||
*/
|
||||
public function getUserForPushEmail(){
|
||||
$num = $this->request->post('num');
|
||||
$list = $this->user_obj->join("t_user_reviewer_info","t_user_reviewer_info.reviewer_id = t_user.user_id",'left')->where('t_user.state',0)->page($num,1000)->select();
|
||||
$re['list'] = $list;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
public function getAshUserForPushEmail(){
|
||||
$num = $this->request->post('num');
|
||||
$list = $this->user_ash_obj->where('major',52)->page($num,1000)->select();
|
||||
// $list = $this->user_ash_obj->where("ash_id",">",3635)->where('major',52)->page($num,1000)->select();
|
||||
$re['list'] = $list;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
// public function delYboardApply(){
|
||||
// $data = $this->request->post();
|
||||
// $rules = new Validate([
|
||||
@@ -935,6 +975,44 @@ class User extends Base
|
||||
$insert['ctime'] = $start_time;
|
||||
$this->user_to_yboard_obj->insert($insert);
|
||||
$this->apply_yboard_obj->where('ap_yboard_id',$data['ap_yboard_id'])->update(['state'=>1]);
|
||||
//同意成为青年科学家后,将其添加到审稿人
|
||||
$check_reviewer = $this->reviewer_to_journal_obj->where('journal_id',$app_info['journal_id'])->where('reviewer_id',$app_info['user_id'])->find();
|
||||
if(!$check_reviewer){//如果不存在那么添加审稿人到对应期刊下面
|
||||
$insert_reviewer['reviewer_id'] = $app_info['user_id'];
|
||||
$insert_reviewer['journal_id'] = $app_info['journal_id'];
|
||||
$insert_reviewer['account'] = $user_info['account'];
|
||||
$insert_reviewer['journal_title'] = $journal_info['title'];
|
||||
$insert_reviewer['ctime'] = time();
|
||||
$this->reviewer_to_journal_obj->insert($insert_reviewer);
|
||||
}
|
||||
//发送邮件提醒用户//发送邮件给用户
|
||||
$dd = "Dear Dr. ".$user_info['realname'].",<br/><br/>";
|
||||
$dd .= "It is my great pleasure to extend my warmest congratulations to you on being selected as a Young Scientist Board Member for <i>".$journal_info['title']."</i> Journal.<br/><br/>";
|
||||
$dd .= "As a member of the Young Scientist Board, you will be an integral part of the peer-review process and will play a crucial role in ensuring the quality and rigor of the journal's content. Your contributions will be invaluable in shaping the direction of the journal and advancing scholarship in your field.<br/><br/>";
|
||||
$dd .= "You can download the Young Scientist Board certificate from the personal center system: https://submission.tmrjournals.com/<br/><br/>";
|
||||
$dd .= "The rights and duties of the members of the Young Scientist Board are as follows:<br/><br/>";
|
||||
$dd .= "Rights:<br/><br/>";
|
||||
$dd .= "1. Electronic Certificate: As a Young Scientist Board Member, you will receive an electronic certificate to acknowledge your position in our publication.<br/>";
|
||||
$dd .= "2. Opportunity for Advancement: Outstanding Youth Editorial Board Members may be considered as potential candidates for the Editorial Board.<br/>";
|
||||
$dd .= "3. Special Issues: You will have the opportunity to apply for a special Issue to expand your influence and that of your team.<br/><br/>";
|
||||
$dd .= "Obligations:<br/><br/>";
|
||||
$dd .= "1. Peer Review: As a Youth Scientist Board Member, you will be required to review and assess 3-5 manuscripts per year, based on your area of research.<br/>";
|
||||
$dd .= "2. Active Promotion: You should actively promote our publication in your academic and professional circles and recommend quality manuscripts to scholars in your network.<br/>";
|
||||
$dd .= "3. Provide Feedback: You should provide constructive feedback and suggestions to improve the direction and style of our publication. If feasible, you may also attend small forums or conferences to represent our publication.<br/><br/>";
|
||||
$dd .= "We look forward to working with you and benefiting from your insights, expertise, and dedication. We are confident that your contributions will make a significant impact on the journal and the academic community as a whole.<br/><br/>";
|
||||
$dd .= "Once again, congratulations on your appointment as a Young Scientist Board Member for <i>".$journal_info['title']."</i>. We are honored to have you on board and look forward to collaborating with you.<br/><br/>";
|
||||
$dd .= 'Sincerely,<br>Editorial Office<br>';
|
||||
$dd .= $journal_info['title'] . '<br>';
|
||||
$dd .= 'Email: ' . $journal_info['email'] . '<br>';
|
||||
$dd .= 'Website: ' . $journal_info['website'] . '<br>';
|
||||
|
||||
$maidata['email'] = $user_info['email'];
|
||||
$maidata['title'] = $journal_info['title'];
|
||||
$maidata['content'] = $dd;
|
||||
$maidata['tmail'] = $journal_info['email'];
|
||||
$maidata['tpassword'] = $journal_info['epassword'];
|
||||
Queue::push('app\api\job\mail@fire', $maidata, "tmail");
|
||||
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
@@ -990,7 +1068,30 @@ class User extends Base
|
||||
if (!$rules->check($data)) {
|
||||
return jsonError($rules->getError());
|
||||
}
|
||||
$app_info = $this->apply_yboard_obj->where('ap_yboard_id',$data['ap_yboard_id'])->find();
|
||||
$user_info = $this->user_obj->where('user_id',$app_info['user_id'])->find();
|
||||
$journal_info = $this->journal_obj->where('journal_id',$app_info['journal_id'])->find();
|
||||
|
||||
|
||||
$this->apply_yboard_obj->where('ap_yboard_id',$data['ap_yboard_id'])->update(['state'=>1]);
|
||||
//发送邮件给用户
|
||||
$dd = "Dear Dr. ".$user_info['realname'].",<br/><br/>";
|
||||
$dd .= "Thank you for your interest in serving as a Young Scientist Board Member for <i>".$journal_info['title']."</i>. After careful consideration of your application and a thorough review of your qualifications and experience, we regret to inform you that your application has been denied.<br/><br/>";
|
||||
$dd .= "Please note that this decision was not a reflection of your skills or qualifications. We received many strong applications, and the selection process was highly competitive. The decision was based on a number of factors, including the qualifications of other candidates, the needs of the journal, and our assessment of how you would fit into the journal's goals and objectives.<br/><br/>";
|
||||
$dd .= "We appreciate the time and effort you put into your application, and we encourage you to continue pursuing your academic and professional goals. We also welcome you to apply for future opportunities with <i>".$journal_info['title']."</i> or other publications as they become available.<br/><br/>";
|
||||
$dd .= "Once again, we regret that we are unable to offer you a position as a Young Scientist Board Member at this time. We wish you all the best in your academic and professional pursuits.<br/><br/>";
|
||||
$dd .= 'Sincerely,<br>Editorial Office<br>';
|
||||
$dd .= $journal_info['title'] . '<br>';
|
||||
$dd .= 'Email: ' . $journal_info['email'] . '<br>';
|
||||
$dd .= 'Website: ' . $journal_info['website'] . '<br>';
|
||||
|
||||
$maidata['email'] = $user_info['email'];
|
||||
$maidata['title'] = $journal_info['title'];
|
||||
$maidata['content'] = $dd;
|
||||
$maidata['tmail'] = $journal_info['email'];
|
||||
$maidata['tpassword'] = $journal_info['epassword'];
|
||||
Queue::push('app\api\job\mail@fire', $maidata, "tmail");
|
||||
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user