This commit is contained in:
wangjinlei
2022-07-13 12:03:08 +08:00
parent 4e0f62fab5
commit 809170fed6
7 changed files with 286 additions and 47 deletions

View File

@@ -393,6 +393,7 @@ class Journal extends Controller {
*/
public function getAllTopics() {
$parents = $this->base_topic_obj->where('parent_id', 0)->where('state', 0)->order('sort desc')->select();
$topicIds = $this->journal_topic_obj->where('title', 'Topics')->where('state', 0)->column('journal_topic_id');
$ca = $this->journal_topic_obj->where('parent_id', 'in', $topicIds)->where('state', 0)->select();
foreach ($parents as $k => $v) {
@@ -862,6 +863,7 @@ class Journal extends Controller {
->where('j_article.journal_id', $data['journal_id'])
->where('j_article.state', 0)
->where('j_journal_stage.is_publish', 1)
->where("j_journal_stage.stage_year",">",intval(date("Y"))-3)
->orderRaw('j_article.cited+j_article.abs_num+j_article.pdf_num desc')
->limit($limit_start, $data['pageSize'])
->select();
@@ -871,6 +873,7 @@ class Journal extends Controller {
->where('j_article.journal_id', $data['journal_id'])
->where('j_article.state', 0)
->where('j_journal_stage.is_publish', 1)
->where("j_journal_stage.stage_year",">",intval(date("Y"))-3)
->count();
if($count>50){//只显示前50片
@@ -1018,15 +1021,15 @@ class Journal extends Controller {
*
* @param name:journal_topic_id type:int require:1 desc:期刊话题id
*
* @return oldJournal:父期刊信息
* @return oldJournal:父话题信息
* @return journalList:话题列表array#
*/
public function getTopicList() {
$data = $this->request->post();
$journal_info = $this->journal_topic_obj->where('journal_topic_id', $data['journal_topic_id'])->find();
$parent_info = $this->journal_topic_obj->where('journal_topic_id', $data['journal_topic_id'])->find();
$list = $this->journal_topic_obj->where('parent_id', $data['journal_topic_id'])->where('state', 0)->order('sort asc')->select();
$re['oldJournal'] = $journal_info;
$re['oldJournal'] = $parent_info;
$re['journalList'] = $list;
return jsonSuccess($re);
}