This commit is contained in:
wangjinlei
2022-04-01 10:52:03 +08:00
parent 9939db1087
commit 7a64786abe

View File

@@ -148,8 +148,8 @@ class Special extends Controller {
} }
/** /**
* @title 客座期刊(获取首页列表) * @title 获取客座期刊
* @description 客座期刊(获取首页列表) * @description 获取客座期刊
* @author wangjinlei * @author wangjinlei
* @url /api/Special/getSpecials * @url /api/Special/getSpecials
* @method POST * @method POST
@@ -180,11 +180,50 @@ class Special extends Controller {
$v['editor'] = $frag; $v['editor'] = $frag;
$f[] = $v; $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; $re['specials'] = $f;
return jsonSuccess($re); return jsonSuccess($re);
} }
/** /**
* @title 客座期刊(获取列表) * @title 客座期刊(获取列表)
* @description 客座期刊(获取列表) * @description 客座期刊(获取列表)