20201112
This commit is contained in:
@@ -148,8 +148,8 @@ class Special extends Controller {
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 客座期刊(获取首页列表)
|
||||
* @description 客座期刊(获取首页列表)
|
||||
* @title 获取客座期刊
|
||||
* @description 获取客座期刊
|
||||
* @author wangjinlei
|
||||
* @url /api/Special/getSpecials
|
||||
* @method POST
|
||||
@@ -180,11 +180,50 @@ class Special extends Controller {
|
||||
$v['editor'] = $frag;
|
||||
$f[] = $v;
|
||||
}
|
||||
$re['specials'] = $f;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @title 客座期刊(获取首页列表)
|
||||
* @description 客座期刊(获取首页列表)
|
||||
* @author wangjinlei
|
||||
* @url /api/Special/getAllSpecials
|
||||
* @method POST
|
||||
*
|
||||
* @return specials:客座期刊列表array#
|
||||
*/
|
||||
public function getAllSpecials(){
|
||||
$list = $this->journal_special_obj
|
||||
->field("j_journal.usx,j_journal.icon,j_journal.title journaltitle,j_journal_special.*")
|
||||
->join("j_journal","j_journal.journal_id = j_journal_special.journal_id","left")
|
||||
->where('j_journal_special.state',2)->order('j_journal_special.journal_special_id desc')->select();
|
||||
$f = [];
|
||||
//获取作者
|
||||
foreach ($list as $k => $v){
|
||||
if(strtotime($v['deadline'])< time()){
|
||||
continue;
|
||||
}
|
||||
$frag = '';
|
||||
$caches = $this->journal_special_to_editor_obj
|
||||
->field('j_journal_special_editor.*')
|
||||
->join('j_journal_special_editor','j_journal_special_editor.journal_special_editor_id = j_journal_special_to_editor.journal_special_editor_id','LEFT')
|
||||
->where('j_journal_special_to_editor.journal_special_id',$v['journal_special_id'])
|
||||
->where('j_journal_special_to_editor.state',0)
|
||||
->select();
|
||||
foreach ($caches as $val){
|
||||
$frag .= $frag == ''?$val['first_name'].' '.$val['last_name']:', '.$val['first_name'].' '.$val['last_name'];
|
||||
}
|
||||
$v['editor'] = $frag;
|
||||
$f[] = $v;
|
||||
}
|
||||
|
||||
$re['specials'] = $f;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @title 客座期刊(获取列表)
|
||||
* @description 客座期刊(获取列表)
|
||||
|
||||
Reference in New Issue
Block a user