@@ -36,8 +36,6 @@ class Journal extends Controller {
protected $base_topic_obj = '' ;
protected $base_topic_obj = '' ;
protected $subscribe_base_topic_obj = '' ;
protected $subscribe_base_topic_obj = '' ;
public function __construct ( \think\Request $request = null ) {
public function __construct ( \think\Request $request = null ) {
parent :: __construct ( $request );
parent :: __construct ( $request );
$this -> admin_obj = Db :: name ( 'admin' );
$this -> admin_obj = Db :: name ( 'admin' );
@@ -140,12 +138,12 @@ class Journal extends Controller {
* @param name:issn type:string require:1 desc:issn号
* @param name:issn type:string require:1 desc:issn号
*
*
*/
*/
public function getJournalByIssn (){
public function getJournalByIssn () {
$data = $this -> request -> post ();
$data = $this -> request -> post ();
$journal_info = $this -> journal_obj -> where ( 'issn' , $data [ 'issn' ]) -> find ();
$journal_info = $this -> journal_obj -> where ( 'issn' , $data [ 'issn' ]) -> find ();
return jsonSuccess ( $journal_info );
return jsonSuccess ( $journal_info );
}
}
/**
/**
* @title 获取期刊话题
* @title 获取期刊话题
* @description 获取期刊话题
* @description 获取期刊话题
@@ -252,14 +250,24 @@ class Journal extends Controller {
$stage_info = $this -> journal_stage_obj -> where ( 'journal_stage_id' , $v [ 'journal_stage_id' ]) -> find ();
$stage_info = $this -> journal_stage_obj -> where ( 'journal_stage_id' , $v [ 'journal_stage_id' ]) -> find ();
//组合cite信息
//组合cite信息
$no = $stage_info [ 'stage_no' ] == 0 ? ':' : '(' . $stage_info [ 'stage_no' ] . '):' ;
$no = $stage_info [ 'stage_no' ] == 0 ? ':' : '(' . $stage_info [ 'stage_no' ] . '):' ;
$cite = $v [ 'abbr' ] . '. ' . $v [ 'title' ] . '. <i>' . choiseJabbr ( $v [ 'article_id' ], $journal_info [ 'jabbr' ]) . '</i>. ' . $stage_info [ 'stage_year' ] . ';' . $stage_info [ 'stage_vol' ] . $no . $v [ 'npp' ] . '. doi:' . $v [ 'doi' ];
$cite = $v [ 'abbr' ] . '. ' . $v [ 'title' ] . '. <i>' . choiseJabbr ( $v [ 'article_id' ], $journal_info [ 'jabbr' ]) . '</i>. ' . $stage_info [ 'stage_year' ] . ';' . $stage_info [ 'stage_vol' ] . $no . $v [ 'npp' ] . '. doi:' . $v [ 'doi' ];
$cache_topic = $this -> article_to_topic_obj -> field ( 'j_journal_topic.*' ) -> join ( 'j_journal_topic' , 'j_journal_topic.journal_topic_id = j_article_to_topic.topic_id' , 'left' ) -> where ( 'j_article_to_topic.article_id' , $v [ 'article_id' ]) -> where ( 'j_article_to_topic.state' , 0 ) -> select ();
$cache_topic = $this -> article_to_topic_obj -> field ( 'j_journal_topic.*' ) -> join ( 'j_journal_topic' , 'j_journal_topic.journal_topic_id = j_article_to_topic.topic_id' , 'left' ) -> where ( 'j_article_to_topic.article_id' , $v [ 'article_id' ]) -> where ( 'j_article_to_topic.state' , 0 ) -> select ();
$list [ $k ][ 'topic' ] = $cache_topic ;
$list [ $k ][ 'topic' ] = $cache_topic ;
$list [ $k ][ 'cite' ] = $cite ;
$list [ $k ][ 'cite' ] = $cite ;
$list [ $k ][ 'authortitle' ] = $this -> getAuthor ( $v );
$list [ $k ][ 'authortitle' ] = $this -> getAuthor ( $v );
}
}
//连续出版判断,决定是否显示出版时间
foreach ( $list as $k => $v ) {
$ca_stage = $this -> journal_stage_obj -> where ( 'journal_stage_id' , $v [ 'journal_stage_id' ]) -> find ();
if (( $v [ 'journal_id' ] == 2 && $ca_stage [ 'stage_year' ] >= 2022 ) || ( $v [ 'journal_id' ] == 18 && $ca_stage [ 'stage_year' ] >= 2022 ) || ( $v [ 'journal_id' ] == 17 && $ca_stage [ 'stage_year' ] >= 2019 )) {
$list [ $k ][ 'isShowOtime' ] = 1 ;
} else {
$list [ $k ][ 'isShowOtime' ] = 0 ;
}
}
// //获取作者
// //获取作者
// foreach ($list as $k => $v) {
// foreach ($list as $k => $v) {
// $list[$k]['authortitle'] = $this->getAuthor($v);
// $list[$k]['authortitle'] = $this->getAuthor($v);
@@ -269,7 +277,7 @@ class Journal extends Controller {
$re [ 'articles' ] = $list ;
$re [ 'articles' ] = $list ;
return jsonSuccess ( $re );
return jsonSuccess ( $re );
}
}
/**
/**
* @title 获取期刊五个话题
* @title 获取期刊五个话题
* @description 获取期刊五个话题
* @description 获取期刊五个话题
@@ -279,18 +287,18 @@ class Journal extends Controller {
*
*
* @return journals:期刊话题列表array#
* @return journals:期刊话题列表array#
*/
*/
public function getJournalFiveTopics (){
public function getJournalFiveTopics () {
$journals = $this -> journal_obj -> where ( 'state' , 0 ) -> select ();
$journals = $this -> journal_obj -> where ( 'state' , 0 ) -> select ();
foreach ( $journals as $k => $v ){
foreach ( $journals as $k => $v ) {
$topic_info = $this -> journal_topic_obj -> where ( 'journal_id' , $v [ 'journal_id' ]) -> where ( 'title' , 'Topics' ) -> where ( 'state' , 0 ) -> find ();
$topic_info = $this -> journal_topic_obj -> where ( 'journal_id' , $v [ 'journal_id' ]) -> where ( 'title' , 'Topics' ) -> where ( 'state' , 0 ) -> find ();
$cache = $this -> journal_topic_obj -> where ( 'parent_id' , $topic_info [ 'journal_topic_id' ]) -> where ( 'state' , 0 ) -> limit ( 5 ) -> select ();
$cache = $this -> journal_topic_obj -> where ( 'parent_id' , $topic_info [ 'journal_topic_id' ]) -> where ( 'state' , 0 ) -> limit ( 5 ) -> select ();
$journals [ $k ][ 'topics' ] = $cache ;
$journals [ $k ][ 'topics' ] = $cache ;
}
}
$re [ 'journals' ] = $journals ;
$re [ 'journals' ] = $journals ;
return jsonSuccess ( $re );
return jsonSuccess ( $re );
}
}
/**
/**
* @title 获取所有期刊话题
* @title 获取所有期刊话题
* @description 获取所有期刊话题
* @description 获取所有期刊话题
@@ -300,18 +308,18 @@ class Journal extends Controller {
*
*
* @return topic:话题列表array#
* @return topic:话题列表array#
*/
*/
public function getAllTopics (){
public function getAllTopics () {
$parents = $this -> base_topic_obj -> where ( 'parent_id' , 0 ) -> where ( 'state' , 0 ) -> order ( 'sort desc' ) -> select ();
$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' );
$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 ();
$ca = $this -> journal_topic_obj -> where ( 'parent_id' , 'in' , $topicIds ) -> where ( 'state' , 0 ) -> select ();
foreach ( $parents as $k => $v ){
foreach ( $parents as $k => $v ) {
$cache = $this -> base_topic_obj -> where ( 'parent_id' , $v [ 'base_topic_id' ])
$cache = $this -> base_topic_obj -> where ( 'parent_id' , $v [ 'base_topic_id' ])
-> where ( 'state' , 0 )
-> where ( 'state' , 0 )
-> order ( 'sort desc' )
-> order ( 'sort desc' )
-> select ();
-> select ();
$cache1 = [];
$cache1 = [];
foreach ( $cache as $val ){
foreach ( $cache as $val ) {
if ( $this -> myCheckTopic ( $val [ 'title' ], $ca )){
if ( $this -> myCheckTopic ( $val [ 'title' ], $ca )) {
$cache1 [] = $val ;
$cache1 [] = $val ;
}
}
}
}
@@ -320,11 +328,11 @@ class Journal extends Controller {
$re [ 'topic' ] = $parents ;
$re [ 'topic' ] = $parents ;
return jsonSuccess ( $re );
return jsonSuccess ( $re );
}
}
private function myCheckTopic ( $value , $array ){
private function myCheckTopic ( $value , $array ) {
$frag = false ;
$frag = false ;
foreach ( $array as $v ){
foreach ( $array as $v ) {
if ( $v [ 'title' ] == $value ){
if ( $v [ 'title' ] == $value ) {
$frag = true ;
$frag = true ;
break ;
break ;
}
}
@@ -332,17 +340,16 @@ class Journal extends Controller {
return $frag ;
return $frag ;
}
}
private function check_topic ( $value , $frag ) {
private function check_topic ( $value , $frag ){
$fra = false ;
$fra = false ;
foreach ( $frag as $k => $v ){
foreach ( $frag as $k => $v ) {
if ( $value [ 'title' ] == $v [ 'title' ]){
if ( $value [ 'title' ] == $v [ 'title' ]) {
$fra = true ;
$fra = true ;
}
}
}
}
return $fra ;
return $fra ;
}
}
/**
/**
* @title 查找话题期刊
* @title 查找话题期刊
* @description 查找话题期刊
* @description 查找话题期刊
@@ -354,27 +361,27 @@ class Journal extends Controller {
*
*
* @return journals:期刊list#
* @return journals:期刊list#
*/
*/
public function findJournalTopic1 (){
public function findJournalTopic1 () {
$data = $this -> request -> post ();
$data = $this -> request -> post ();
$base_topic = $this -> base_topic_obj -> where ( 'base_topic_id' , $data [ 'topic' ]) -> find ();
$base_topic = $this -> base_topic_obj -> where ( 'base_topic_id' , $data [ 'topic' ]) -> find ();
$topicids = $this -> journal_topic_obj -> where ( 'title' , 'Topics' ) -> where ( 'state' , 0 ) -> column ( 'journal_topic_id' );
$topicids = $this -> journal_topic_obj -> where ( 'title' , 'Topics' ) -> where ( 'state' , 0 ) -> column ( 'journal_topic_id' );
$list = $this -> journal_topic_obj
$list = $this -> journal_topic_obj
-> field ( 'j_journal.*,j_journal_topic.title topic_title,j_journal_topic.journal_topic_id' )
-> field ( 'j_journal.*,j_journal_topic.title topic_title,j_journal_topic.journal_topic_id' )
-> join ( 'j_journal' , 'j_journal.journal_id = j_journal_topic.journal_id' , 'left' )
-> join ( 'j_journal' , 'j_journal.journal_id = j_journal_topic.journal_id' , 'left' )
-> where ( 'j_journal_topic.parent_id' , 'in' , $topicids )
-> where ( 'j_journal_topic.parent_id' , 'in' , $topicids )
-> where ( 'j_journal_topic.state' , 0 )
-> where ( 'j_journal_topic.state' , 0 )
-> where ( 'j_journal_topic.title' , 'like' , '%' . $base_topic [ 'title' ] . '%' )
-> where ( 'j_journal_topic.title' , 'like' , '%' . $base_topic [ 'title' ] . '%' )
-> select ();
-> select ();
foreach ( $list as $k => $v ){
foreach ( $list as $k => $v ) {
$abs = $this -> journal_abs_obj -> where ( 'journal_id' , $v [ 'journal_id' ]) -> where ( 'state' , 0 ) -> order ( 'sort' ) -> limit ( 4 ) -> select ();
$abs = $this -> journal_abs_obj -> where ( 'journal_id' , $v [ 'journal_id' ]) -> where ( 'state' , 0 ) -> order ( 'sort' ) -> limit ( 4 ) -> select ();
$list [ $k ][ 'abs' ] = $abs ;
$list [ $k ][ 'abs' ] = $abs ;
}
}
$re [ 'journals' ] = $list ;
$re [ 'journals' ] = $list ;
return jsonSuccess ( $re );
return jsonSuccess ( $re );
}
}
/**
/**
* @title 查找话题期刊
* @title 查找话题期刊
* @description 查找话题期刊
* @description 查找话题期刊
@@ -386,38 +393,38 @@ class Journal extends Controller {
*
*
* @return journals:期刊list#
* @return journals:期刊list#
*/
*/
public function findJournalTopic (){
public function findJournalTopic () {
$data = $this -> request -> post ();
$data = $this -> request -> post ();
$list = [];
$list = [];
if ( $data [ 'journal_topic_id' ] == 0 ){
if ( $data [ 'journal_topic_id' ] == 0 ) {
$journals = $this -> journal_obj -> where ( 'state' , 0 ) -> order ( " sort desc " ) -> select ();
$journals = $this -> journal_obj -> where ( 'state' , 0 ) -> order ( " sort desc " ) -> select ();
foreach ( $journals as $k => $v ){
foreach ( $journals as $k => $v ) {
$topic_info = $this -> journal_topic_obj -> where ( 'journal_id' , $v [ 'journal_id' ]) -> where ( 'title' , 'Topics' ) -> where ( 'state' , 0 ) -> find ();
$topic_info = $this -> journal_topic_obj -> where ( 'journal_id' , $v [ 'journal_id' ]) -> where ( 'title' , 'Topics' ) -> where ( 'state' , 0 ) -> find ();
$cache = $this -> journal_topic_obj -> where ( 'parent_id' , $topic_info [ 'journal_topic_id' ]) -> where ( 'state' , 0 ) -> limit ( 5 ) -> select ();
$cache = $this -> journal_topic_obj -> where ( 'parent_id' , $topic_info [ 'journal_topic_id' ]) -> where ( 'state' , 0 ) -> limit ( 5 ) -> select ();
$journals [ $k ][ 'topics' ] = $cache ;
$journals [ $k ][ 'topics' ] = $cache ;
}
}
$list = $journals ;
$list = $journals ;
} else {
} else {
$topic_info = $this -> journal_topic_obj -> where ( 'journal_topic_id' , $data [ 'journal_topic_id' ]) -> find ();
$topic_info = $this -> journal_topic_obj -> where ( 'journal_topic_id' , $data [ 'journal_topic_id' ]) -> find ();
$tpids = $this -> journal_topic_obj -> where ( 'title' , 'Topics' ) -> where ( 'state' , 0 ) -> column ( 'journal_topic_id' );
$tpids = $this -> journal_topic_obj -> where ( 'title' , 'Topics' ) -> where ( 'state' , 0 ) -> column ( 'journal_topic_id' );
$journals = $this -> journal_topic_obj
$journals = $this -> journal_topic_obj
-> field ( 'j_journal.*,j_journal_topic.title topic_title,j_journal_topic.journal_topic_id' )
-> field ( 'j_journal.*,j_journal_topic.title topic_title,j_journal_topic.journal_topic_id' )
-> join ( 'j_journal' , 'j_journal.journal_id = j_journal_topic.journal_id' , 'left' )
-> join ( 'j_journal' , 'j_journal.journal_id = j_journal_topic.journal_id' , 'left' )
-> where ( 'j_journal_topic.parent_id' , 'in' , $tpids )
-> where ( 'j_journal_topic.parent_id' , 'in' , $tpids )
-> where ( 'j_journal_topic.title' , $topic_info [ 'title' ])
-> where ( 'j_journal_topic.title' , $topic_info [ 'title' ])
-> where ( 'j_journal_topic.state' , 0 )
-> where ( 'j_journal_topic.state' , 0 )
-> order ( " j_journal.sort desc " )
-> order ( " j_journal.sort desc " )
-> select ();
-> select ();
$list = $journals ;
$list = $journals ;
}
}
foreach ( $list as $k => $v ){
foreach ( $list as $k => $v ) {
$abs = $this -> journal_abs_obj -> where ( 'journal_id' , $v [ 'journal_id' ]) -> where ( 'state' , 0 ) -> order ( 'sort' ) -> limit ( 4 ) -> select ();
$abs = $this -> journal_abs_obj -> where ( 'journal_id' , $v [ 'journal_id' ]) -> where ( 'state' , 0 ) -> order ( 'sort' ) -> limit ( 4 ) -> select ();
$list [ $k ][ 'abs' ] = $abs ;
$list [ $k ][ 'abs' ] = $abs ;
}
}
$re [ 'journals' ] = $list ;
$re [ 'journals' ] = $list ;
return jsonSuccess ( $re );
return jsonSuccess ( $re );
}
}
/**
/**
* @title 获取通用话题文章
* @title 获取通用话题文章
* @description 获取通用话题文章
* @description 获取通用话题文章
@@ -432,43 +439,53 @@ class Journal extends Controller {
* @return articleList:文章信息#
* @return articleList:文章信息#
* @return count:总数
* @return count:总数
*/
*/
public function getBaseTopicArticles (){
public function getBaseTopicArticles () {
$data = $this -> request -> post ();
$data = $this -> request -> post ();
$limit_start = ( $data [ 'pageIndex' ] - 1 ) * $data [ 'pageSize' ];
$limit_start = ( $data [ 'pageIndex' ] - 1 ) * $data [ 'pageSize' ];
$base_topic_info = $this -> base_topic_obj -> where ( 'base_topic_id' , $data [ 'base_topic_id' ]) -> find ();
$base_topic_info = $this -> base_topic_obj -> where ( 'base_topic_id' , $data [ 'base_topic_id' ]) -> find ();
$chileds = $this -> base_topic_obj -> where ( 'parent_id' , $base_topic_info [ 'base_topic_id' ]) -> where ( 'state' , 0 ) -> select ();
$chileds = $this -> base_topic_obj -> where ( 'parent_id' , $base_topic_info [ 'base_topic_id' ]) -> where ( 'state' , 0 ) -> select ();
$topicids = $this -> journal_topic_obj -> where ( 'title' , $base_topic_info [ 'title' ]) -> where ( 'state' , 0 ) -> column ( 'journal_topic_id' );
$topicids = $this -> journal_topic_obj -> where ( 'title' , $base_topic_info [ 'title' ]) -> where ( 'state' , 0 ) -> column ( 'journal_topic_id' );
foreach ( $chileds as $v ){
foreach ( $chileds as $v ) {
$cache_ids = $this -> journal_topic_obj -> where ( 'title' , $v [ 'title' ]) -> where ( 'state' , 0 ) -> column ( 'journal_topic_id' );
$cache_ids = $this -> journal_topic_obj -> where ( 'title' , $v [ 'title' ]) -> where ( 'state' , 0 ) -> column ( 'journal_topic_id' );
$topicids = array_merge ( $topicids , $cache_ids );
$topicids = array_merge ( $topicids , $cache_ids );
}
}
$ids = $this -> article_to_topic_obj -> where ( 'topic_id' , 'in' , $topicids ) -> where ( 'state' , 0 ) -> column ( 'article_id' );
$ids = $this -> article_to_topic_obj -> where ( 'topic_id' , 'in' , $topicids ) -> where ( 'state' , 0 ) -> column ( 'article_id' );
$list = $this -> article_obj
$list = $this -> article_obj
-> field ( 'j_article.*,j_journal_stage.*,j_journal.jabbr,j_journal.usx,j_journal.title journal_title' )
-> field ( 'j_article.*,j_journal_stage.*,j_journal.jabbr,j_journal.usx,j_journal.title journal_title' )
-> join ( 'j_journal' , 'j_article.journal_id = j_journal.journal_id' , 'left' )
-> join ( 'j_journal' , 'j_article.journal_id = j_journal.journal_id' , 'left' )
-> join ( 'j_journal_stage' , 'j_article.journal_stage_id = j_journal_stage.journal_stage_id' , 'left' )
-> join ( 'j_journal_stage' , 'j_article.journal_stage_id = j_journal_stage.journal_stage_id' , 'left' )
-> where ( 'j_article.article_id' , 'in' , $ids )
-> where ( 'j_article.article_id' , 'in' , $ids )
-> where ( 'j_article.state' , 0 )
-> where ( 'j_article.state' , 0 )
-> order ( 'j_journal_stage.stage_year desc,j_article.article_id desc' )
-> order ( 'j_journal_stage.stage_year desc,j_article.article_id desc' )
-> limit ( $limit_start , $data [ 'pageSize' ])
-> limit ( $limit_start , $data [ 'pageSize' ])
-> select ();
-> select ();
$count = $this -> article_obj
$count = $this -> article_obj
-> where ( 'j_article.article_id' , 'in' , $ids )
-> where ( 'j_article.article_id' , 'in' , $ids )
-> where ( 'j_article.state' , 0 )
-> where ( 'j_article.state' , 0 )
-> count ();
-> count ();
//获取作者
//获取作者
foreach ( $list as $k => $v ) {
foreach ( $list as $k => $v ) {
$stage_info = $this -> journal_stage_obj -> where ( 'journal_stage_id' , $v [ 'journal_stage_id' ]) -> find ();
$stage_info = $this -> journal_stage_obj -> where ( 'journal_stage_id' , $v [ 'journal_stage_id' ]) -> find ();
$journal_info = $this -> journal_obj -> where ( 'journal_id' , $v [ 'journal_id' ]) -> find ();
$journal_info = $this -> journal_obj -> where ( 'journal_id' , $v [ 'journal_id' ]) -> find ();
//组合cite信息
//组合cite信息
$no = $stage_info [ 'stage_no' ] == 0 ? ':' : '(' . $stage_info [ 'stage_no' ] . '):' ;
$no = $stage_info [ 'stage_no' ] == 0 ? ':' : '(' . $stage_info [ 'stage_no' ] . '):' ;
$cite = $v [ 'abbr' ] . '. ' . $v [ 'title' ] . '. <i>' . choiseJabbr ( $v [ 'article_id' ], $journal_info [ 'jabbr' ]) . '</i>. ' . $stage_info [ 'stage_year' ] . ';' . $stage_info [ 'stage_vol' ] . $no . $v [ 'npp' ] . '. doi:' . $v [ 'doi' ];
$cite = $v [ 'abbr' ] . '. ' . $v [ 'title' ] . '. <i>' . choiseJabbr ( $v [ 'article_id' ], $journal_info [ 'jabbr' ]) . '</i>. ' . $stage_info [ 'stage_year' ] . ';' . $stage_info [ 'stage_vol' ] . $no . $v [ 'npp' ] . '. doi:' . $v [ 'doi' ];
$cache_topic = $this -> article_to_topic_obj -> field ( 'j_journal_topic.*' ) -> join ( 'j_journal_topic' , 'j_journal_topic.journal_topic_id = j_article_to_topic.topic_id' , 'left' ) -> where ( 'j_article_to_topic.article_id' , $v [ 'article_id' ]) -> where ( 'j_article_to_topic.state' , 0 ) -> select ();
$cache_topic = $this -> article_to_topic_obj -> field ( 'j_journal_topic.*' ) -> join ( 'j_journal_topic' , 'j_journal_topic.journal_topic_id = j_article_to_topic.topic_id' , 'left' ) -> where ( 'j_article_to_topic.article_id' , $v [ 'article_id' ]) -> where ( 'j_article_to_topic.state' , 0 ) -> select ();
$list [ $k ][ 'topic' ] = $cache_topic ;
$list [ $k ][ 'topic' ] = $cache_topic ;
$list [ $k ][ 'cite' ] = $cite ;
$list [ $k ][ 'cite' ] = $cite ;
$list [ $k ][ 'authortitle' ] = $this -> getAuthor ( $v );
$list [ $k ][ 'authortitle' ] = $this -> getAuthor ( $v );
}
}
//连续出版判断,决定是否显示出版时间
foreach ( $list as $k => $v ) {
$ca_stage = $this -> journal_stage_obj -> where ( 'journal_stage_id' , $v [ 'journal_stage_id' ]) -> find ();
if (( $v [ 'journal_id' ] == 2 && $ca_stage [ 'stage_year' ] >= 2022 ) || ( $v [ 'journal_id' ] == 18 && $ca_stage [ 'stage_year' ] >= 2022 ) || ( $v [ 'journal_id' ] == 17 && $ca_stage [ 'stage_year' ] >= 2019 )) {
$list [ $k ][ 'isShowOtime' ] = 1 ;
} else {
$list [ $k ][ 'isShowOtime' ] = 0 ;
}
}
//标题斜体
//标题斜体
foreach ( $list as $k => $v ) {
foreach ( $list as $k => $v ) {
$caches = $this -> article_ltai_obj -> where ( 'article_id' , $v [ 'article_id' ]) -> where ( 'state' , 0 ) -> column ( 'content' );
$caches = $this -> article_ltai_obj -> where ( 'article_id' , $v [ 'article_id' ]) -> where ( 'state' , 0 ) -> column ( 'content' );
@@ -521,15 +538,26 @@ class Journal extends Controller {
if ( $journal_info [ 'journal_id' ] == 22 ) {
if ( $journal_info [ 'journal_id' ] == 22 ) {
$cite = $v [ 'abbr' ] . '. ' . $v [ 'title' ] . '[J]. ' . $journal_info [ 'jabbr' ] . ',' . $stage_info [ 'stage_year' ] . ',' . $stage_info [ 'stage_vol' ] . $no . $v [ 'npp' ] . '. doi:' . $v [ 'doi' ];
$cite = $v [ 'abbr' ] . '. ' . $v [ 'title' ] . '[J]. ' . $journal_info [ 'jabbr' ] . ',' . $stage_info [ 'stage_year' ] . ',' . $stage_info [ 'stage_vol' ] . $no . $v [ 'npp' ] . '. doi:' . $v [ 'doi' ];
} else {
} else {
$cite = $v [ 'abbr' ] . '. ' . $v [ 'title' ] . '. <i>' . choiseJabbr ( $v [ 'article_id' ], $journal_info [ 'jabbr' ]) . '</i>. ' . $stage_info [ 'stage_year' ] . ';' . $stage_info [ 'stage_vol' ] . $no . $v [ 'npp' ] . '. doi:' . $v [ 'doi' ];
$cite = $v [ 'abbr' ] . '. ' . $v [ 'title' ] . '. <i>' . choiseJabbr ( $v [ 'article_id' ], $journal_info [ 'jabbr' ]) . '</i>. ' . $stage_info [ 'stage_year' ] . ';' . $stage_info [ 'stage_vol' ] . $no . $v [ 'npp' ] . '. doi:' . $v [ 'doi' ];
}
}
$cache_topic = $this -> article_to_topic_obj -> field ( 'j_journal_topic.*' ) -> join ( 'j_journal_topic' , 'j_journal_topic.journal_topic_id = j_article_to_topic.topic_id' , 'left' ) -> where ( 'j_article_to_topic.article_id' , $v [ 'article_id' ]) -> where ( 'j_article_to_topic.state' , 0 ) -> select ();
$cache_topic = $this -> article_to_topic_obj -> field ( 'j_journal_topic.*' ) -> join ( 'j_journal_topic' , 'j_journal_topic.journal_topic_id = j_article_to_topic.topic_id' , 'left' ) -> where ( 'j_article_to_topic.article_id' , $v [ 'article_id' ]) -> where ( 'j_article_to_topic.state' , 0 ) -> select ();
$list [ $k ][ 'topic' ] = $cache_topic ;
$list [ $k ][ 'topic' ] = $cache_topic ;
$list [ $k ][ 'cite' ] = $cite ;
$list [ $k ][ 'cite' ] = $cite ;
$list [ $k ][ 'authortitle' ] = $this -> getAuthor ( $v );
$list [ $k ][ 'authortitle' ] = $this -> getAuthor ( $v );
}
}
//连续出版判断,决定是否显示出版时间
foreach ( $list as $k => $v ) {
$ca_stage = $this -> journal_stage_obj -> where ( 'journal_stage_id' , $v [ 'journal_stage_id' ]) -> find ();
if (( $v [ 'journal_id' ] == 2 && $ca_stage [ 'stage_year' ] >= 2022 ) || ( $v [ 'journal_id' ] == 18 && $ca_stage [ 'stage_year' ] >= 2022 ) || ( $v [ 'journal_id' ] == 17 && $ca_stage [ 'stage_year' ] >= 2019 )) {
$list [ $k ][ 'isShowOtime' ] = 1 ;
} else {
$list [ $k ][ 'isShowOtime' ] = 0 ;
}
}
return json ([ 'code' => 0 , 'msg' => 'success' , 'data' => [ 'stage' => $stage_info , 'articleList' => $list ]]);
return json ([ 'code' => 0 , 'msg' => 'success' , 'data' => [ 'stage' => $stage_info , 'articleList' => $list ]]);
}
}
@@ -540,14 +568,14 @@ class Journal extends Controller {
$frag = '' ;
$frag = '' ;
foreach ( $list as $k => $v ) {
foreach ( $list as $k => $v ) {
$ca = '' ;
$ca = '' ;
if ( $v [ 'orcid' ] != '' ){
if ( $v [ 'orcid' ] != '' ) {
$ca = '<a href="https://orcid.org/' . $v [ 'orcid' ] . '" target="_blank"><img src="img/or_id.png" alt="" style="width: 13px;margin-left: 3px;"></a>' ;
$ca = '<a href="https://orcid.org/' . $v [ 'orcid' ] . '" target="_blank"><img src="img/or_id.png" alt="" style="width: 13px;margin-left: 3px;"></a>' ;
}
}
$frag = $frag == '' ? '' . $v [ 'author_name' ] . $ca : $frag . ', ' . $v [ 'author_name' ] . $ca ;
$frag = $frag == '' ? '' . $v [ 'author_name' ] . $ca : $frag . ', ' . $v [ 'author_name' ] . $ca ;
}
}
return $frag ;
return $frag ;
}
}
/**
/**
* @title 获取文章作者分布
* @title 获取文章作者分布
* @description 获取文章作者分布
* @description 获取文章作者分布
@@ -557,33 +585,33 @@ class Journal extends Controller {
*
*
* @param name:journal_id type:int require:1 desc:期刊id
* @param name:journal_id type:int require:1 desc:期刊id
*/
*/
public function getAuthorFB (){
public function getAuthorFB () {
$data = $this -> request -> post ();
$data = $this -> request -> post ();
$stages = $this -> journal_stage_obj -> where ( 'journal_id' , $data [ 'journal_id' ]) -> where ( 'stage_year' , '>' , ( intval ( date ( 'Y' )) - 3 )) -> where ( 'state' , 0 ) -> column ( 'journal_stage_id' );
$stages = $this -> journal_stage_obj -> where ( 'journal_id' , $data [ 'journal_id' ]) -> where ( 'stage_year' , '>' , ( intval ( date ( 'Y' )) - 3 )) -> where ( 'state' , 0 ) -> column ( 'journal_stage_id' );
$articles = $this -> article_obj -> where ( 'journal_id' , $data [ 'journal_id' ]) -> where ( 'journal_stage_id' , 'in' , $stages ) -> where ( 'state' , 0 ) -> column ( 'article_id' );
$articles = $this -> article_obj -> where ( 'journal_id' , $data [ 'journal_id' ]) -> where ( 'journal_stage_id' , 'in' , $stages ) -> where ( 'state' , 0 ) -> column ( 'article_id' );
$list = $this -> article_author_obj -> where ( 'article_id' , 'in' , $articles ) -> where ( 'state' , 0 ) -> select ();
$list = $this -> article_author_obj -> where ( 'article_id' , 'in' , $articles ) -> where ( 'state' , 0 ) -> select ();
$frag = [];
$frag = [];
foreach ( $list as $v ){
foreach ( $list as $v ) {
$frag [ $v [ 'author_name' ]] = $v [ 'author_country' ];
$frag [ $v [ 'author_name' ]] = $v [ 'author_country' ];
}
}
$f = [];
$f = [];
foreach ( $frag as $val ){
foreach ( $frag as $val ) {
if ( isset ( $f [ $val ])){
if ( isset ( $f [ $val ])) {
$f [ $val ] ++ ;
$f [ $val ] ++ ;
} else {
} else {
$f [ $val ] = 1 ;
$f [ $val ] = 1 ;
}
}
}
}
$res = [];
$res = [];
foreach ( $f as $k => $value ){
foreach ( $f as $k => $value ) {
$res [] = array (
$res [] = array (
'author_country' => $k ,
'author_country' => $k ,
'sum' => $value
'sum' => $value
);
);
}
}
for ( $i = 0 ; $i < count ( $res ); $i ++ ){
for ( $i = 0 ; $i < count ( $res ); $i ++ ) {
for ( $j = $i + 1 ; $j < count ( $res ); $j ++ ) {
for ( $j = $i + 1 ; $j < count ( $res ); $j ++ ) {
if ( $res [ $i ][ 'sum' ] < $res [ $j ][ 'sum' ]){
if ( $res [ $i ][ 'sum' ] < $res [ $j ][ 'sum' ]) {
$tem = $res [ $i ]; // 这里临时变量,存贮$i的值
$tem = $res [ $i ]; // 这里临时变量,存贮$i的值
$res [ $i ] = $res [ $j ]; // 第一次更换位置
$res [ $i ] = $res [ $j ]; // 第一次更换位置
$res [ $j ] = $tem ; // 完成位置互换
$res [ $j ] = $tem ; // 完成位置互换
@@ -648,13 +676,23 @@ class Journal extends Controller {
$stage_info = $this -> journal_stage_obj -> where ( 'journal_stage_id' , $v [ 'journal_stage_id' ]) -> find ();
$stage_info = $this -> journal_stage_obj -> where ( 'journal_stage_id' , $v [ 'journal_stage_id' ]) -> find ();
//组合cite信息
//组合cite信息
$no = $stage_info [ 'stage_no' ] == 0 ? ':' : '(' . $stage_info [ 'stage_no' ] . '):' ;
$no = $stage_info [ 'stage_no' ] == 0 ? ':' : '(' . $stage_info [ 'stage_no' ] . '):' ;
$cite = $v [ 'abbr' ] . '. ' . $v [ 'title' ] . '. <i>' . choiseJabbr ( $v [ 'article_id' ], $journal_info [ 'jabbr' ]) . '</i>. ' . $stage_info [ 'stage_year' ] . ';' . $stage_info [ 'stage_vol' ] . $no . $v [ 'npp' ] . '. doi:' . $v [ 'doi' ];
$cite = $v [ 'abbr' ] . '. ' . $v [ 'title' ] . '. <i>' . choiseJabbr ( $v [ 'article_id' ], $journal_info [ 'jabbr' ]) . '</i>. ' . $stage_info [ 'stage_year' ] . ';' . $stage_info [ 'stage_vol' ] . $no . $v [ 'npp' ] . '. doi:' . $v [ 'doi' ];
$cache_topic = $this -> article_to_topic_obj -> field ( 'j_journal_topic.*' ) -> join ( 'j_journal_topic' , 'j_journal_topic.journal_topic_id = j_article_to_topic.topic_id' , 'left' ) -> where ( 'j_article_to_topic.article_id' , $v [ 'article_id' ]) -> where ( 'j_article_to_topic.state' , 0 ) -> select ();
$cache_topic = $this -> article_to_topic_obj -> field ( 'j_journal_topic.*' ) -> join ( 'j_journal_topic' , 'j_journal_topic.journal_topic_id = j_article_to_topic.topic_id' , 'left' ) -> where ( 'j_article_to_topic.article_id' , $v [ 'article_id' ]) -> where ( 'j_article_to_topic.state' , 0 ) -> select ();
$list [ $k ][ 'topic' ] = $cache_topic ;
$list [ $k ][ 'topic' ] = $cache_topic ;
$list [ $k ][ 'cite' ] = $cite ;
$list [ $k ][ 'cite' ] = $cite ;
$list [ $k ][ 'authortitle' ] = $this -> getAuthor ( $v );
$list [ $k ][ 'authortitle' ] = $this -> getAuthor ( $v );
}
}
//连续出版判断,决定是否显示出版时间
foreach ( $list as $k => $v ) {
$ca_stage = $this -> journal_stage_obj -> where ( 'journal_stage_id' , $v [ 'journal_stage_id' ]) -> find ();
if (( $v [ 'journal_id' ] == 2 && $ca_stage [ 'stage_year' ] >= 2022 ) || ( $v [ 'journal_id' ] == 18 && $ca_stage [ 'stage_year' ] >= 2022 ) || ( $v [ 'journal_id' ] == 17 && $ca_stage [ 'stage_year' ] >= 2019 )) {
$list [ $k ][ 'isShowOtime' ] = 1 ;
} else {
$list [ $k ][ 'isShowOtime' ] = 0 ;
}
}
return json ([ 'code' => 0 , 'msg' => 'success' , 'data' => [ 'articlelist' => $list , 'count' => $count ]]);
return json ([ 'code' => 0 , 'msg' => 'success' , 'data' => [ 'articlelist' => $list , 'count' => $count ]]);
}
}
@@ -687,8 +725,8 @@ class Journal extends Controller {
$stage_info = $this -> journal_stage_obj -> where ( 'journal_stage_id' , $v [ 'journal_stage_id' ]) -> find ();
$stage_info = $this -> journal_stage_obj -> where ( 'journal_stage_id' , $v [ 'journal_stage_id' ]) -> find ();
//组合cite信息
//组合cite信息
$no = $stage_info [ 'stage_no' ] == 0 ? ':' : '(' . $stage_info [ 'stage_no' ] . '):' ;
$no = $stage_info [ 'stage_no' ] == 0 ? ':' : '(' . $stage_info [ 'stage_no' ] . '):' ;
$cite = $v [ 'abbr' ] . '. ' . $v [ 'title' ] . '. <i>' . choiseJabbr ( $v [ 'article_id' ], $journal_info [ 'jabbr' ]) . '</i>. ' . $stage_info [ 'stage_year' ] . ';' . $stage_info [ 'stage_vol' ] . $no . $v [ 'npp' ] . '. doi:' . $v [ 'doi' ];
$cite = $v [ 'abbr' ] . '. ' . $v [ 'title' ] . '. <i>' . choiseJabbr ( $v [ 'article_id' ], $journal_info [ 'jabbr' ]) . '</i>. ' . $stage_info [ 'stage_year' ] . ';' . $stage_info [ 'stage_vol' ] . $no . $v [ 'npp' ] . '. doi:' . $v [ 'doi' ];
$cache_topic = $this -> article_to_topic_obj -> field ( 'j_journal_topic.*' ) -> join ( 'j_journal_topic' , 'j_journal_topic.journal_topic_id = j_article_to_topic.topic_id' , 'left' ) -> where ( 'j_article_to_topic.article_id' , $v [ 'article_id' ]) -> where ( 'j_article_to_topic.state' , 0 ) -> select ();
$cache_topic = $this -> article_to_topic_obj -> field ( 'j_journal_topic.*' ) -> join ( 'j_journal_topic' , 'j_journal_topic.journal_topic_id = j_article_to_topic.topic_id' , 'left' ) -> where ( 'j_article_to_topic.article_id' , $v [ 'article_id' ]) -> where ( 'j_article_to_topic.state' , 0 ) -> select ();
$list [ $k ][ 'topic' ] = $cache_topic ;
$list [ $k ][ 'topic' ] = $cache_topic ;
$list [ $k ][ 'cite' ] = $cite ;
$list [ $k ][ 'cite' ] = $cite ;
@@ -704,6 +742,16 @@ class Journal extends Controller {
$list [ $k ][ 'title' ] = $cache_title ;
$list [ $k ][ 'title' ] = $cache_title ;
}
}
//连续出版判断,决定是否显示出版时间
foreach ( $list as $k => $v ) {
$ca_stage = $this -> journal_stage_obj -> where ( 'journal_stage_id' , $v [ 'journal_stage_id' ]) -> find ();
if (( $v [ 'journal_id' ] == 2 && $ca_stage [ 'stage_year' ] >= 2022 ) || ( $v [ 'journal_id' ] == 18 && $ca_stage [ 'stage_year' ] >= 2022 ) || ( $v [ 'journal_id' ] == 17 && $ca_stage [ 'stage_year' ] >= 2019 )) {
$list [ $k ][ 'isShowOtime' ] = 1 ;
} else {
$list [ $k ][ 'isShowOtime' ] = 0 ;
}
}
return json ([ 'code' => 0 , 'msg' => 'success' , 'data' => [ 'articlelist' => $list ]]);
return json ([ 'code' => 0 , 'msg' => 'success' , 'data' => [ 'articlelist' => $list ]]);
}
}
@@ -740,19 +788,32 @@ class Journal extends Controller {
-> where ( 'j_article.state' , 0 )
-> where ( 'j_article.state' , 0 )
-> where ( 'j_journal_stage.is_publish' , 1 )
-> where ( 'j_journal_stage.is_publish' , 1 )
-> count ();
-> count ();
if ( $count > 50 ){ //只显示前50片
$count = 50 ;
}
//获取作者
//获取作者
foreach ( $list as $k => $v ) {
foreach ( $list as $k => $v ) {
$stage_info = $this -> journal_stage_obj -> where ( 'journal_stage_id' , $v [ 'journal_stage_id' ]) -> find ();
$stage_info = $this -> journal_stage_obj -> where ( 'journal_stage_id' , $v [ 'journal_stage_id' ]) -> find ();
//组合cite信息
//组合cite信息
$no = $stage_info [ 'stage_no' ] == 0 ? ':' : '(' . $stage_info [ 'stage_no' ] . '):' ;
$no = $stage_info [ 'stage_no' ] == 0 ? ':' : '(' . $stage_info [ 'stage_no' ] . '):' ;
$cite = $v [ 'abbr' ] . '. ' . $v [ 'title' ] . '. <i>' . choiseJabbr ( $v [ 'article_id' ], $journal_info [ 'jabbr' ]) . '</i>. ' . $stage_info [ 'stage_year' ] . ';' . $stage_info [ 'stage_vol' ] . $no . $v [ 'npp' ] . '. doi:' . $v [ 'doi' ];
$cite = $v [ 'abbr' ] . '. ' . $v [ 'title' ] . '. <i>' . choiseJabbr ( $v [ 'article_id' ], $journal_info [ 'jabbr' ]) . '</i>. ' . $stage_info [ 'stage_year' ] . ';' . $stage_info [ 'stage_vol' ] . $no . $v [ 'npp' ] . '. doi:' . $v [ 'doi' ];
$cache_topic = $this -> article_to_topic_obj -> field ( 'j_journal_topic.*' ) -> join ( 'j_journal_topic' , 'j_journal_topic.journal_topic_id = j_article_to_topic.topic_id' , 'left' ) -> where ( 'j_article_to_topic.article_id' , $v [ 'article_id' ]) -> where ( 'j_article_to_topic.state' , 0 ) -> select ();
$cache_topic = $this -> article_to_topic_obj -> field ( 'j_journal_topic.*' ) -> join ( 'j_journal_topic' , 'j_journal_topic.journal_topic_id = j_article_to_topic.topic_id' , 'left' ) -> where ( 'j_article_to_topic.article_id' , $v [ 'article_id' ]) -> where ( 'j_article_to_topic.state' , 0 ) -> select ();
$list [ $k ][ 'topic' ] = $cache_topic ;
$list [ $k ][ 'topic' ] = $cache_topic ;
$list [ $k ][ 'cite' ] = $cite ;
$list [ $k ][ 'cite' ] = $cite ;
$list [ $k ][ 'authortitle' ] = $this -> getAuthor ( $v );
$list [ $k ][ 'authortitle' ] = $this -> getAuthor ( $v );
}
}
//连续出版判断,决定是否显示出版时间
foreach ( $list as $k => $v ){
$ca_stage = $this -> journal_stage_obj -> where ( 'journal_stage_id' , $v [ 'journal_stage_id' ]) -> find ();
if (( $v [ 'journal_id' ] == 2 && $ca_stage [ 'stage_year' ] >= 2022 ) || ( $v [ 'journal_id' ] == 18 && $ca_stage [ 'stage_year' ] >= 2022 ) || ( $v [ 'journal_id' ] == 17 && $ca_stage [ 'stage_year' ] >= 2019 )){
$list [ $k ][ 'isShowOtime' ] = 1 ;
} else {
$list [ $k ][ 'isShowOtime' ] = 0 ;
}
}
//标题斜体
//标题斜体
foreach ( $list as $k => $v ) {
foreach ( $list as $k => $v ) {
@@ -832,8 +893,8 @@ class Journal extends Controller {
$stage_info = $this -> journal_stage_obj -> where ( 'journal_stage_id' , $v [ 'journal_stage_id' ]) -> find ();
$stage_info = $this -> journal_stage_obj -> where ( 'journal_stage_id' , $v [ 'journal_stage_id' ]) -> find ();
//组合cite信息
//组合cite信息
$no = $stage_info [ 'stage_no' ] == 0 ? ':' : '(' . $stage_info [ 'stage_no' ] . '):' ;
$no = $stage_info [ 'stage_no' ] == 0 ? ':' : '(' . $stage_info [ 'stage_no' ] . '):' ;
$cite = $v [ 'abbr' ] . '. ' . $v [ 'title' ] . '. <i>' . choiseJabbr ( $v [ 'article_id' ], $journal_info [ 'jabbr' ]) . '</i>. ' . $stage_info [ 'stage_year' ] . ';' . $stage_info [ 'stage_vol' ] . $no . $v [ 'npp' ] . '. doi:' . $v [ 'doi' ];
$cite = $v [ 'abbr' ] . '. ' . $v [ 'title' ] . '. <i>' . choiseJabbr ( $v [ 'article_id' ], $journal_info [ 'jabbr' ]) . '</i>. ' . $stage_info [ 'stage_year' ] . ';' . $stage_info [ 'stage_vol' ] . $no . $v [ 'npp' ] . '. doi:' . $v [ 'doi' ];
$cache_topic = $this -> article_to_topic_obj -> field ( 'j_journal_topic.*' ) -> join ( 'j_journal_topic' , 'j_journal_topic.journal_topic_id = j_article_to_topic.topic_id' , 'left' ) -> where ( 'j_article_to_topic.article_id' , $v [ 'article_id' ]) -> where ( 'j_article_to_topic.state' , 0 ) -> select ();
$cache_topic = $this -> article_to_topic_obj -> field ( 'j_journal_topic.*' ) -> join ( 'j_journal_topic' , 'j_journal_topic.journal_topic_id = j_article_to_topic.topic_id' , 'left' ) -> where ( 'j_article_to_topic.article_id' , $v [ 'article_id' ]) -> where ( 'j_article_to_topic.state' , 0 ) -> select ();
$list [ $k ][ 'topic' ] = $cache_topic ;
$list [ $k ][ 'topic' ] = $cache_topic ;
$list [ $k ][ 'cite' ] = $cite ;
$list [ $k ][ 'cite' ] = $cite ;
@@ -848,6 +909,15 @@ class Journal extends Controller {
}
}
$list [ $k ][ 'title' ] = $cache_title ;
$list [ $k ][ 'title' ] = $cache_title ;
}
}
//连续出版判断,决定是否显示出版时间
foreach ( $list as $k => $v ) {
$ca_stage = $this -> journal_stage_obj -> where ( 'journal_stage_id' , $v [ 'journal_stage_id' ]) -> find ();
if (( $v [ 'journal_id' ] == 2 && $ca_stage [ 'stage_year' ] >= 2022 ) || ( $v [ 'journal_id' ] == 18 && $ca_stage [ 'stage_year' ] >= 2022 ) || ( $v [ 'journal_id' ] == 17 && $ca_stage [ 'stage_year' ] >= 2019 )) {
$list [ $k ][ 'isShowOtime' ] = 1 ;
} else {
$list [ $k ][ 'isShowOtime' ] = 0 ;
}
}
return jsonSuccess ([ 'topic_info' => $topic_info , 'articlelist' => $list ]);
return jsonSuccess ([ 'topic_info' => $topic_info , 'articlelist' => $list ]);
} else {
} else {
@@ -1013,34 +1083,32 @@ class Journal extends Controller {
$re [ 'topics' ] = $list ;
$re [ 'topics' ] = $list ;
return jsonSuccess ( $re );
return jsonSuccess ( $re );
}
}
public function tttt (){
public function tttt () {
$host = " localhost " ; //mysql服务器地址
$host = " localhost " ; //mysql服务器地址
$user = 'root' ;
$user = 'root' ;
$pass = 'root' ;
$pass = 'root' ;
$dbName = 'journal' ; //数据可名称
$dbName = 'journal' ; //数据可名称
$charSet = 'utf8' ;
$charSet = 'utf8' ;
$port = '3306' ;
$port = '3306' ;
$conn = mysql_connect ( $host , $user , $padd );
$conn = mysql_connect ( $host , $user , $padd );
if ( ! $conn ){
if ( ! $conn ) {
echo 'unable to connect to DB ' . mysql_error ();
echo 'unable to connect to DB ' . mysql_error ();
exit ();
exit ();
}
}
query ( 'use ' . $db );
query ( 'use ' . $db );
$sql = " select * from j_user limit 1 " ; //这里是sql语句
$sql = " select * from j_user limit 1 " ; //这里是sql语句
$res = getAll ( $sql );
$res = getAll ( $sql );
echo '<pre>' ;
echo '<pre>' ;
var_dump ( $res );
var_dump ( $res );
echo '</pre>' ;
echo '</pre>' ;
}
}
/**
/**
* @title 添加期刊订阅
* @title 添加期刊订阅
@@ -1066,7 +1134,7 @@ class Journal extends Controller {
$insert [ 'journal_id' ] = $data [ 'journal_id' ];
$insert [ 'journal_id' ] = $data [ 'journal_id' ];
$insert [ 'email' ] = $data [ 'email' ];
$insert [ 'email' ] = $data [ 'email' ];
$id = $this -> subscribe_journal_obj -> insertGetId ( $insert );
$id = $this -> subscribe_journal_obj -> insertGetId ( $insert );
$journal_info = $this -> journal_obj -> where ( " journal_id " , $data [ 'journal_id' ]) -> find ();
$journal_info = $this -> journal_obj -> where ( " journal_id " , $data [ 'journal_id' ]) -> find ();
//发送邮件感谢
//发送邮件感谢
$tt = 'Dear Researcher,<br><br>' ;
$tt = 'Dear Researcher,<br><br>' ;
$tt .= 'Welcome you to the email alert for the latest research and more. Thank you for your interest in our publications and topics.<br>' ;
$tt .= 'Welcome you to the email alert for the latest research and more. Thank you for your interest in our publications and topics.<br>' ;
@@ -1076,7 +1144,7 @@ class Journal extends Controller {
$tt .= 'Email: publisher@tmrjournals.com' ;
$tt .= 'Email: publisher@tmrjournals.com' ;
$tt .= 'www.tmrjournals.com' ;
$tt .= 'www.tmrjournals.com' ;
$maidata [ 'email' ] = $data [ 'email' ];
$maidata [ 'email' ] = $data [ 'email' ];
$maidata [ 'title' ] = $journal_info [ 'title' ] . " ISSN " . $journal_info [ 'issn' ]; //'Traditional Medicine Research ISSN 2413-3973';
$maidata [ 'title' ] = $journal_info [ 'title' ] . " ISSN " . $journal_info [ 'issn' ]; //'Traditional Medicine Research ISSN 2413-3973';
$maidata [ 'content' ] = $tt ;
$maidata [ 'content' ] = $tt ;
$maidata [ 'tmail' ] = 'publicrelations@tmrjournals.com' ;
$maidata [ 'tmail' ] = 'publicrelations@tmrjournals.com' ;
$maidata [ 'tpassword' ] = 'pRWU999999' ;
$maidata [ 'tpassword' ] = 'pRWU999999' ;
@@ -1084,7 +1152,7 @@ class Journal extends Controller {
return jsonSuccess ([]);
return jsonSuccess ([]);
}
}
/**
/**
* @title 添加期刊订阅通过issn
* @title 添加期刊订阅通过issn
* @description 添加期刊订阅通过issn
* @description 添加期刊订阅通过issn
@@ -1095,9 +1163,9 @@ class Journal extends Controller {
* @param name:issn type:string require:1 desc:issn号
* @param name:issn type:string require:1 desc:issn号
* @param name:email type:string require:1 desc:邮件地址
* @param name:email type:string require:1 desc:邮件地址
*/
*/
public function addSubscribeByIssn (){
public function addSubscribeByIssn () {
$data = $this -> request -> post ();
$data = $this -> request -> post ();
$journal_info = $this -> journal_obj -> where ( 'issn' , $data [ 'issn' ]) -> find ();
$journal_info = $this -> journal_obj -> where ( 'issn' , $data [ 'issn' ]) -> find ();
//去重
//去重
$repeat = $this -> subscribe_journal_obj
$repeat = $this -> subscribe_journal_obj
-> where ( 'journal_id' , $journal_info [ 'journal_id' ])
-> where ( 'journal_id' , $journal_info [ 'journal_id' ])
@@ -1119,7 +1187,7 @@ class Journal extends Controller {
$tt .= 'Email: publisher@tmrjournals.com' ;
$tt .= 'Email: publisher@tmrjournals.com' ;
$tt .= 'www.tmrjournals.com' ;
$tt .= 'www.tmrjournals.com' ;
$maidata [ 'email' ] = $data [ 'email' ];
$maidata [ 'email' ] = $data [ 'email' ];
$maidata [ 'title' ] = $journal_info [ 'title' ] . " ISSN " . $journal_info [ 'issn' ]; //'Traditional Medicine Research ISSN 2413-3973';
$maidata [ 'title' ] = $journal_info [ 'title' ] . " ISSN " . $journal_info [ 'issn' ]; //'Traditional Medicine Research ISSN 2413-3973';
$maidata [ 'content' ] = $tt ;
$maidata [ 'content' ] = $tt ;
$maidata [ 'tmail' ] = 'publicrelations@tmrjournals.com' ;
$maidata [ 'tmail' ] = 'publicrelations@tmrjournals.com' ;
$maidata [ 'tpassword' ] = 'pRWU999999' ;
$maidata [ 'tpassword' ] = 'pRWU999999' ;
@@ -1127,15 +1195,15 @@ class Journal extends Controller {
return jsonSuccess ([]);
return jsonSuccess ([]);
}
}
public function pushEmail (){
public function pushEmail () {
die ;
die ;
$list = $this -> subscribe_journal_obj -> where ( 'journal_id' , 1 ) -> select ();
$list = $this -> subscribe_journal_obj -> where ( 'journal_id' , 1 ) -> select ();
// $a = [];
// $a = [];
// $a[] = ['email'=>'751475802@qq.com'];
// $a[] = ['email'=>'751475802@qq.com'];
// $a[] = ['email'=>'13662001490@126.com'];
// $a[] = ['email'=>'13662001490@126.com'];
foreach ( $list as $v ){
foreach ( $list as $v ) {
$tt = 'Dear Researcher,<br><br>' ;
$tt = 'Dear Researcher,<br><br>' ;
$tt .= 'We are so kindly to bring you a notice that we are glad to invite eminent people as the Reviewer for Traditional Medicine Research (ISSN 2413-3973).<br><br>' ;
$tt .= 'We are so kindly to bring you a notice that we are glad to invite eminent people as the Reviewer for Traditional Medicine Research (ISSN 2413-3973).<br><br>' ;
$tt .= 'Traditional Medicine Research has been included in Emerging Sources Citation Index (ESCI), Embase, DOAJ, ProQuest, J-Gate, EuroPub, WHO-COVID-19 Database, Google Scholar, EBSCO, ect.<br><br>' ;
$tt .= 'Traditional Medicine Research has been included in Emerging Sources Citation Index (ESCI), Embase, DOAJ, ProQuest, J-Gate, EuroPub, WHO-COVID-19 Database, Google Scholar, EBSCO, ect.<br><br>' ;
@@ -1154,7 +1222,7 @@ class Journal extends Controller {
Queue :: push ( 'app\api\job\mail@fire' , $maidata , " mail " );
Queue :: push ( 'app\api\job\mail@fire' , $maidata , " mail " );
}
}
}
}
/**
/**
* @title 获取期刊主页分期信息
* @title 获取期刊主页分期信息
* @description 获取期刊主页分期信息
* @description 获取期刊主页分期信息
@@ -1166,16 +1234,16 @@ class Journal extends Controller {
*
*
* @return stages:分期信息#
* @return stages:分期信息#
*/
*/
public function getMainPageStages (){
public function getMainPageStages () {
$data = $this -> request -> post ();
$data = $this -> request -> post ();
$frag = [];
$frag = [];
$list = $this -> journal_stage_obj -> where ( 'journal_id' , $data [ 'journal_id' ]) -> where ( 'stage_year' , date ( " Y " )) -> where ( 'is_publish' , 1 ) -> where ( 'state' , 0 ) -> order ( " stage_no desc " ) -> select ();
$list = $this -> journal_stage_obj -> where ( 'journal_id' , $data [ 'journal_id' ]) -> where ( 'stage_year' , date ( " Y " )) -> where ( 'is_publish' , 1 ) -> where ( 'state' , 0 ) -> order ( " stage_no desc " ) -> select ();
if ( count ( $list ) == 0 ){
if ( count ( $list ) == 0 ) {
$frag = $this -> journal_stage_obj -> where ( 'journal_id' , $data [ 'journal_id' ]) -> where ( 'stage_year' , date ( " Y " , strtotime ( " -1 year " ))) -> where ( 'is_publish' , 1 ) -> where ( 'state' , 0 ) -> order ( " stage_no desc " ) -> select ();
$frag = $this -> journal_stage_obj -> where ( 'journal_id' , $data [ 'journal_id' ]) -> where ( 'stage_year' , date ( " Y " , strtotime ( " -1 year " ))) -> where ( 'is_publish' , 1 ) -> where ( 'state' , 0 ) -> order ( " stage_no desc " ) -> select ();
} else {
} else {
$frag = $list ;
$frag = $list ;
}
}
$re [ 'stages' ] = $frag ;
$re [ 'stages' ] = $frag ;
return jsonSuccess ( $re );
return jsonSuccess ( $re );
}
}
@@ -1208,10 +1276,10 @@ class Journal extends Controller {
$insert [ 'topic_id' ] = $v ;
$insert [ 'topic_id' ] = $v ;
$insert [ 'email' ] = $data [ 'email' ];
$insert [ 'email' ] = $data [ 'email' ];
$id = $this -> subscribe_topic_obj -> insertGetId ( $insert );
$id = $this -> subscribe_topic_obj -> insertGetId ( $insert );
$cache_info = $this -> journal_topic_obj -> where ( 'journal_topic_id' , $v ) -> find ();
$cache_info = $this -> journal_topic_obj -> where ( 'journal_topic_id' , $v ) -> find ();
$str .= '<a href="http://journalapi.tmrjournals.com/public/index.php/api/Journal/UnsubscribeTopic/snum/' . $id . '">Unsubscribe topic->' . $cache_info [ 'title' ] . '</a><br>' ;
$str .= '<a href="http://journalapi.tmrjournals.com/public/index.php/api/Journal/UnsubscribeTopic/snum/' . $id . '">Unsubscribe topic->' . $cache_info [ 'title' ] . '</a><br>' ;
}
}
if ( $str == '' ){
if ( $str == '' ) {
return jsonError ( 'repeat subscribe!' );
return jsonError ( 'repeat subscribe!' );
}
}
//发送邮件感谢
//发送邮件感谢
@@ -1271,7 +1339,7 @@ class Journal extends Controller {
$res = Queue :: push ( 'app\api\job\mail@fire' , $maidata , " mail " );
$res = Queue :: push ( 'app\api\job\mail@fire' , $maidata , " mail " );
return jsonSuccess ([]);
return jsonSuccess ([]);
}
}
/**
/**
* @title 添加通用话题订阅
* @title 添加通用话题订阅
* @description 添加通用话题订阅
* @description 添加通用话题订阅
@@ -1282,7 +1350,7 @@ class Journal extends Controller {
* @param name:base_topic_id type:int require:1 desc:期刊话题id
* @param name:base_topic_id type:int require:1 desc:期刊话题id
* @param name:email type:string require:1 desc:邮箱地址
* @param name:email type:string require:1 desc:邮箱地址
*/
*/
public function addSubscribeBaseTopic (){
public function addSubscribeBaseTopic () {
$data = $this -> request -> post ();
$data = $this -> request -> post ();
//去重
//去重
$repeat = $this -> subscribe_base_topic_obj
$repeat = $this -> subscribe_base_topic_obj
@@ -1312,14 +1380,14 @@ class Journal extends Controller {
Queue :: push ( 'app\api\job\mail@fire' , $maidata , " mail " );
Queue :: push ( 'app\api\job\mail@fire' , $maidata , " mail " );
return jsonSuccess ([]);
return jsonSuccess ([]);
}
}
public function UnsubscribeTopic ( $snum ) {
public function UnsubscribeTopic ( $snum ) {
$this -> subscribe_topic_obj -> where ( 'subscribe_topic_id' , $snum ) -> update ([ 'state' => 1 ]);
$this -> subscribe_topic_obj -> where ( 'subscribe_topic_id' , $snum ) -> update ([ 'state' => 1 ]);
echo 'Unsubscribe successfully!' ;
echo 'Unsubscribe successfully!' ;
}
}
public function UnsubscribeBaseTopic ( $snum ){
public function UnsubscribeBaseTopic ( $snum ) {
$this -> subscribe_base_topic_obj -> where ( 'subscribe_base_topic_id' , $snum ) -> update ([ 'state' => 1 ]);
$this -> subscribe_base_topic_obj -> where ( 'subscribe_base_topic_id' , $snum ) -> update ([ 'state' => 1 ]);
echo 'Unsubscribe successfully!' ;
echo 'Unsubscribe successfully!' ;
}
}
@@ -1362,7 +1430,7 @@ class Journal extends Controller {
public function searchArticle () {
public function searchArticle () {
$data = $this -> request -> post ();
$data = $this -> request -> post ();
$limit_start = ( $data [ 'pageIndex' ] - 1 ) * $data [ 'pageSize' ];
$limit_start = ( $data [ 'pageIndex' ] - 1 ) * $data [ 'pageSize' ];
$arts = $this -> article_author_obj -> where ( 'state' , 0 ) -> where ( " author_name like '% " . str_replace ( " ' " , " '' " , trim ( $data [ 'keyword' ])) . " %' " ) -> column ( 'article_id' );
$arts = $this -> article_author_obj -> where ( 'state' , 0 ) -> where ( " author_name like '% " . str_replace ( " ' " , " '' " , trim ( $data [ 'keyword' ])) . " %' " ) -> column ( 'article_id' );
$list = $this -> article_obj
$list = $this -> article_obj
-> where ( 'journal_id' , $data [ 'journal_id' ])
-> where ( 'journal_id' , $data [ 'journal_id' ])
-> where ( 'state' , 0 )
-> where ( 'state' , 0 )
@@ -1370,9 +1438,9 @@ class Journal extends Controller {
// ->where('title like "%' . str_replace("'","''",trim($data['keyword'])) . '%" or abstract like "%' . str_replace("'","''",trim($data['keyword'])) . '%" or keywords like "%' . str_replace("'","''",trim($data['keyword'])) . '%"')
// ->where('title like "%' . str_replace("'","''",trim($data['keyword'])) . '%" or abstract like "%' . str_replace("'","''",trim($data['keyword'])) . '%" or keywords like "%' . str_replace("'","''",trim($data['keyword'])) . '%"')
-> where ( function ( $query ) use ( $arts , $data ) {
-> where ( function ( $query ) use ( $arts , $data ) {
$query -> where ( 'article_id' , 'in' , $arts )
$query -> where ( 'article_id' , 'in' , $arts )
-> whereOr ( " `title` like '% " . str_replace ( " ' " , " '' " , trim ( $data [ 'keyword' ])) . " %' or `abstract` like '% " . str_replace ( " ' " , " '' " , trim ( $data [ 'keyword' ])) . " %' or `keywords` like '% " . str_replace ( " ' " , " '' " , trim ( $data [ 'keyword' ])) . " %' " );
-> whereOr ( " `title` like '% " . str_replace ( " ' " , " '' " , trim ( $data [ 'keyword' ])) . " %' or `abstract` like '% " . str_replace ( " ' " , " '' " , trim ( $data [ 'keyword' ])) . " %' or `keywords` like '% " . str_replace ( " ' " , " '' " , trim ( $data [ 'keyword' ])) . " %' " );
})
})
-> orderRaw ( " (CASE WHEN title LIKE '% " . str_replace ( " ' " , " '' " , trim ( $data [ 'keyword' ])) . " %' THEN 1 ELSE 0 END) desc " )
-> orderRaw ( " (CASE WHEN title LIKE '% " . str_replace ( " ' " , " '' " , trim ( $data [ 'keyword' ])) . " %' THEN 1 ELSE 0 END) desc " )
-> limit ( $limit_start , $data [ 'pageSize' ])
-> limit ( $limit_start , $data [ 'pageSize' ])
-> select ();
-> select ();
$count = $this -> article_obj
$count = $this -> article_obj
@@ -1380,7 +1448,7 @@ class Journal extends Controller {
-> where ( 'state' , 0 )
-> where ( 'state' , 0 )
-> where ( function ( $query ) use ( $arts , $data ) {
-> where ( function ( $query ) use ( $arts , $data ) {
$query -> where ( 'article_id' , 'in' , $arts )
$query -> where ( 'article_id' , 'in' , $arts )
-> whereOr ( 'title|abstract|keywords' , 'like' , '%' . str_replace ( " ' " , " '' " , trim ( $data [ 'keyword' ])) . '%' );
-> whereOr ( 'title|abstract|keywords' , 'like' , '%' . str_replace ( " ' " , " '' " , trim ( $data [ 'keyword' ])) . '%' );
})
})
-> count ();
-> count ();
@@ -1393,8 +1461,8 @@ class Journal extends Controller {
$list [ $k ][ 'stage' ] = $stage_info ;
$list [ $k ][ 'stage' ] = $stage_info ;
//组合cite信息
//组合cite信息
$no = $stage_info [ 'stage_no' ] == 0 ? ':' : '(' . $stage_info [ 'stage_no' ] . '):' ;
$no = $stage_info [ 'stage_no' ] == 0 ? ':' : '(' . $stage_info [ 'stage_no' ] . '):' ;
$cite = $v [ 'abbr' ] . '. ' . $v [ 'title' ] . '. <i>' . choiseJabbr ( $v [ 'article_id' ], $journal_info [ 'jabbr' ]) . '</i>. ' . $stage_info [ 'stage_year' ] . ';' . $stage_info [ 'stage_vol' ] . $no . $v [ 'npp' ] . '. doi:' . $v [ 'doi' ];
$cite = $v [ 'abbr' ] . '. ' . $v [ 'title' ] . '. <i>' . choiseJabbr ( $v [ 'article_id' ], $journal_info [ 'jabbr' ]) . '</i>. ' . $stage_info [ 'stage_year' ] . ';' . $stage_info [ 'stage_vol' ] . $no . $v [ 'npp' ] . '. doi:' . $v [ 'doi' ];
$cache_topic = $this -> article_to_topic_obj -> field ( 'j_journal_topic.*' ) -> join ( 'j_journal_topic' , 'j_journal_topic.journal_topic_id = j_article_to_topic.topic_id' , 'left' ) -> where ( 'j_article_to_topic.article_id' , $v [ 'article_id' ]) -> where ( 'j_article_to_topic.state' , 0 ) -> select ();
$cache_topic = $this -> article_to_topic_obj -> field ( 'j_journal_topic.*' ) -> join ( 'j_journal_topic' , 'j_journal_topic.journal_topic_id = j_article_to_topic.topic_id' , 'left' ) -> where ( 'j_article_to_topic.article_id' , $v [ 'article_id' ]) -> where ( 'j_article_to_topic.state' , 0 ) -> select ();
$list [ $k ][ 'topic' ] = $cache_topic ;
$list [ $k ][ 'topic' ] = $cache_topic ;
$list [ $k ][ 'cite' ] = $cite ;
$list [ $k ][ 'cite' ] = $cite ;
@@ -1455,8 +1523,8 @@ class Journal extends Controller {
$list [ $k ][ 'journal' ] = $journal_info ;
$list [ $k ][ 'journal' ] = $journal_info ;
//组合cite信息
//组合cite信息
$no = $stage_info [ 'stage_no' ] == 0 ? ':' : '(' . $stage_info [ 'stage_no' ] . '):' ;
$no = $stage_info [ 'stage_no' ] == 0 ? ':' : '(' . $stage_info [ 'stage_no' ] . '):' ;
$cite = $v [ 'abbr' ] . '. ' . $v [ 'title' ] . '. <i>' . choiseJabbr ( $v [ 'article_id' ], $journal_info [ 'jabbr' ]) . '</i>. ' . $stage_info [ 'stage_year' ] . ';' . $stage_info [ 'stage_vol' ] . $no . $v [ 'npp' ] . '. doi:' . $v [ 'doi' ];
$cite = $v [ 'abbr' ] . '. ' . $v [ 'title' ] . '. <i>' . choiseJabbr ( $v [ 'article_id' ], $journal_info [ 'jabbr' ]) . '</i>. ' . $stage_info [ 'stage_year' ] . ';' . $stage_info [ 'stage_vol' ] . $no . $v [ 'npp' ] . '. doi:' . $v [ 'doi' ];
$cache_topic = $this -> article_to_topic_obj -> field ( 'j_journal_topic.*' ) -> join ( 'j_journal_topic' , 'j_journal_topic.journal_topic_id = j_article_to_topic.topic_id' , 'left' ) -> where ( 'j_article_to_topic.article_id' , $v [ 'article_id' ]) -> where ( 'j_article_to_topic.state' , 0 ) -> select ();
$cache_topic = $this -> article_to_topic_obj -> field ( 'j_journal_topic.*' ) -> join ( 'j_journal_topic' , 'j_journal_topic.journal_topic_id = j_article_to_topic.topic_id' , 'left' ) -> where ( 'j_article_to_topic.article_id' , $v [ 'article_id' ]) -> where ( 'j_article_to_topic.state' , 0 ) -> select ();
$list [ $k ][ 'topic' ] = $cache_topic ;
$list [ $k ][ 'topic' ] = $cache_topic ;
$list [ $k ][ 'cite' ] = $cite ;
$list [ $k ][ 'cite' ] = $cite ;
@@ -1474,7 +1542,7 @@ class Journal extends Controller {
$re [ 'count' ] = $count ;
$re [ 'count' ] = $count ;
return jsonSuccess ( $re );
return jsonSuccess ( $re );
}
}
/**
/**
* @title 编委国际化
* @title 编委国际化
* @description 编委国际化
* @description 编委国际化
@@ -1502,7 +1570,6 @@ class Journal extends Controller {
$re [ 'country' ] = $frag ;
$re [ 'country' ] = $frag ;
return jsonSuccess ( $re );
return jsonSuccess ( $re );
}
}
/**
/**
* @title 查找文章精确查找
* @title 查找文章精确查找
@@ -1590,7 +1657,7 @@ class Journal extends Controller {
$list [ $k ][ 'journal' ] = $journal_info ;
$list [ $k ][ 'journal' ] = $journal_info ;
//组合cite信息
//组合cite信息
$no = $stage_info [ 'stage_no' ] == 0 ? ':' : '(' . $stage_info [ 'stage_no' ] . '):' ;
$no = $stage_info [ 'stage_no' ] == 0 ? ':' : '(' . $stage_info [ 'stage_no' ] . '):' ;
$cite = $v [ 'abbr' ] . '. ' . $v [ 'title' ] . '. <i>' . choiseJabbr ( $v [ 'article_id' ], $journal_info [ 'jabbr' ]) . '</i>. ' . $stage_info [ 'stage_year' ] . ';' . $stage_info [ 'stage_vol' ] . $no . $v [ 'npp' ] . '. doi:' . $v [ 'doi' ];
$cite = $v [ 'abbr' ] . '. ' . $v [ 'title' ] . '. <i>' . choiseJabbr ( $v [ 'article_id' ], $journal_info [ 'jabbr' ]) . '</i>. ' . $stage_info [ 'stage_year' ] . ';' . $stage_info [ 'stage_vol' ] . $no . $v [ 'npp' ] . '. doi:' . $v [ 'doi' ];
$list [ $k ][ 'cite' ] = $cite ;
$list [ $k ][ 'cite' ] = $cite ;
$list [ $k ][ 'authortitle' ] = $this -> getAuthor ( $v );
$list [ $k ][ 'authortitle' ] = $this -> getAuthor ( $v );
//斜体变红
//斜体变红
@@ -1689,8 +1756,8 @@ class Journal extends Controller {
$list [ $k ][ 'journal' ] = $journal_info ;
$list [ $k ][ 'journal' ] = $journal_info ;
//组合cite信息
//组合cite信息
$no = $stage_info [ 'stage_no' ] == 0 ? ':' : '(' . $stage_info [ 'stage_no' ] . '):' ;
$no = $stage_info [ 'stage_no' ] == 0 ? ':' : '(' . $stage_info [ 'stage_no' ] . '):' ;
$cite = $v [ 'abbr' ] . '. ' . $v [ 'title' ] . '. <i>' . choiseJabbr ( $v [ 'article_id' ], $journal_info [ 'jabbr' ]) . '</i>. ' . $stage_info [ 'stage_year' ] . ';' . $stage_info [ 'stage_vol' ] . $no . $v [ 'npp' ] . '. doi:' . $v [ 'doi' ];
$cite = $v [ 'abbr' ] . '. ' . $v [ 'title' ] . '. <i>' . choiseJabbr ( $v [ 'article_id' ], $journal_info [ 'jabbr' ]) . '</i>. ' . $stage_info [ 'stage_year' ] . ';' . $stage_info [ 'stage_vol' ] . $no . $v [ 'npp' ] . '. doi:' . $v [ 'doi' ];
$cache_topic = $this -> article_to_topic_obj -> field ( 'j_journal_topic.*' ) -> join ( 'j_journal_topic' , 'j_journal_topic.journal_topic_id = j_article_to_topic.topic_id' , 'left' ) -> where ( 'j_article_to_topic.article_id' , $v [ 'article_id' ]) -> where ( 'j_article_to_topic.state' , 0 ) -> select ();
$cache_topic = $this -> article_to_topic_obj -> field ( 'j_journal_topic.*' ) -> join ( 'j_journal_topic' , 'j_journal_topic.journal_topic_id = j_article_to_topic.topic_id' , 'left' ) -> where ( 'j_article_to_topic.article_id' , $v [ 'article_id' ]) -> where ( 'j_article_to_topic.state' , 0 ) -> select ();
$list [ $k ][ 'topic' ] = $cache_topic ;
$list [ $k ][ 'topic' ] = $cache_topic ;
$list [ $k ][ 'cite' ] = $cite ;
$list [ $k ][ 'cite' ] = $cite ;