20201112
This commit is contained in:
@@ -208,6 +208,23 @@ class Article extends Controller {
|
||||
$re['articleList'] = $list;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 增加文章阅读数量
|
||||
* @description 增加文章阅读数量
|
||||
* @author wangjinlei
|
||||
* @url /api/Article/addArticleNum
|
||||
* @method POST
|
||||
*
|
||||
* @param name:article_id type:int require:1 desc:期刊id
|
||||
* @param name:type type:string require:1 desc:类型(abs/html/pdf)
|
||||
*
|
||||
*/
|
||||
public function addArticleNum(){
|
||||
$data = $this->request->post();
|
||||
$this->article_obj->where('article_id',$data['article_id'])->setInc($data['type'].'_num');
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取top文章列表
|
||||
|
||||
@@ -69,6 +69,28 @@ class Journal extends Controller {
|
||||
->select();
|
||||
return json(['code' => 0, 'msg' => 'success', 'data' => ['journalList' => $res]]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取期刊列表byname
|
||||
* @description 获取期刊列表byname
|
||||
* @author wangjinlei
|
||||
* @url /api/Journal/getJournalListByName
|
||||
* @method POST
|
||||
*
|
||||
*
|
||||
* @return journalList:期刊列表@
|
||||
* @journalList title:标题 issn:issn editorinchief:editorinchief acceptance:acceptance finaldecision:finaldecision apc:apc
|
||||
*/
|
||||
public function getJournalListByName() {
|
||||
$where['j_journal.state'] = 0;
|
||||
$res = $this->journal_obj
|
||||
->field('j_journal.*,j_admin.realname realname')
|
||||
->join('j_admin', 'j_admin.admin_id = j_journal.editor_id', 'LEFT')
|
||||
->where($where)
|
||||
->order('j_journal.title')
|
||||
->select();
|
||||
return json(['code' => 0, 'msg' => 'success', 'data' => ['journalList' => $res]]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取期刊信息
|
||||
@@ -171,6 +193,7 @@ class Journal extends Controller {
|
||||
->join([['j_article','j_article_to_line.article_id = j_article.article_id','LEFT'],['j_journal_stage','j_journal_stage.journal_stage_id = j_article.journal_stage_id','LEFT']])
|
||||
->where('j_article_to_line.journal_line_id',$data['journal_line_id'])
|
||||
->where('j_article_to_line.state',0)
|
||||
->order('j_aricle.sort desc')
|
||||
->select();
|
||||
//标题斜体
|
||||
foreach ($list as $k => $v) {
|
||||
@@ -263,6 +286,7 @@ class Journal extends Controller {
|
||||
->join('j_journal_stage', 'j_article.journal_stage_id = j_journal_stage.journal_stage_id', 'LEFT')
|
||||
->where('j_article.journal_stage_id', 'in', $stages)
|
||||
->where('j_article.state', 0)
|
||||
->order('j_article.sort desc')
|
||||
->select();
|
||||
|
||||
//标题斜体
|
||||
@@ -336,7 +360,12 @@ class Journal extends Controller {
|
||||
*/
|
||||
public function getTopArticle() {
|
||||
$data = $this->request->post();
|
||||
$list = $this->article_obj->field('j_article.*,j_journal_stage.*')->join('j_journal_stage', 'j_article.journal_stage_id = j_journal_stage.journal_stage_id', 'LEFT')->where('j_article.journal_id', $data['journal_id'])->where('j_article.state', 0)->orderRaw('j_article.cited+j_article.abs_num+j_article.pdf_num desc')->select();
|
||||
$list = $this->article_obj->field('j_article.*,j_journal_stage.*')
|
||||
->join('j_journal_stage', 'j_article.journal_stage_id = j_journal_stage.journal_stage_id', 'LEFT')
|
||||
->where('j_article.journal_id', $data['journal_id'])
|
||||
->where('j_article.state', 0)
|
||||
->orderRaw('j_article.cited+j_article.abs_num+j_article.pdf_num desc')
|
||||
->select();
|
||||
|
||||
//获取作者
|
||||
foreach ($list as $k => $v) {
|
||||
@@ -411,6 +440,7 @@ class Journal extends Controller {
|
||||
->join(array(['j_article', 'j_article.article_id = j_article_to_topic.article_id', 'LEFT'], ['j_journal_stage', 'j_article.journal_stage_id = j_journal_stage.journal_stage_id', 'LEFT']))
|
||||
->where('j_article_to_topic.topic_id', $topic_info['journal_topic_id'])
|
||||
->where('j_article_to_topic.state', 0)
|
||||
->order('j_article.sort desc')
|
||||
->select();
|
||||
|
||||
//获取作者
|
||||
|
||||
@@ -149,6 +149,12 @@ class Main extends Controller{
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function test(){
|
||||
echo 'ookkjjhhgg';
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取查找文章列表
|
||||
* @description 获取查找文章列表
|
||||
|
||||
Reference in New Issue
Block a user