Merge remote-tracking branch 'origin/master'

This commit is contained in:
wangjinlei
2025-07-16 11:42:04 +08:00
2 changed files with 55 additions and 3 deletions

View File

@@ -184,8 +184,60 @@ class Special extends Controller {
$re['specials'] = $f; $re['specials'] = $f;
return jsonSuccess($re); return jsonSuccess($re);
} }
/**
* @title 获取客座期刊-新
* @description 获取客座期刊
* @author wangjinlei
* @url /api/Special/getSpecials
* @method POST
*
* @param name:journal_id type:int require:1 desc:期刊id
*
* @return specials:客座期刊列表array#
*/
public function getSpecialsNew(){
//获取参数
$data = $this->request->post();
//期刊ID
$iJournalId = empty($data['journal_id']) ? 0 : $data['journal_id'];
//定义返回数组
$re = ['is_show' => 'false','specials' => [],'count' => 0];
if(empty($iJournalId)){
return jsonSuccess($re);
}
//参数组装
$aWhere = ['state' => 2,'journal_id' => $iJournalId];
//查询数量
$iCount = $this->journal_special_obj->where($aWhere)->count();
if(empty($iCount)){
return jsonSuccess($re);
}
$re['count'] = $iCount;
//查询期刊详情
$list = $this->journal_special_obj->where($aWhere)->order('journal_special_id desc')->limit(4)->select();
$f = [];
//获取作者
foreach ($list as $k => $v){
$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['is_show'] = 'true';
$re['specials'] = $f;
return jsonSuccess($re);
}
/** /**
* @title 获取全部客座期刊 * @title 获取全部客座期刊
* @description 获取全部客座期刊 * @description 获取全部客座期刊

View File

@@ -31,7 +31,7 @@ class Supplementary extends Controller
return json_encode(['status' => 2,'msg' => 'Please select an journal']); return json_encode(['status' => 2,'msg' => 'Please select an journal']);
} }
//期刊标题 //期刊标题
$sTitle = empty($aParam['journal_title']) ? ['About Journal','About us','Journal Information'] : $aParam['journal_title']; $sTitle = empty($aParam['journal_title']) ? ['About Journal','About us','Journal Information','Aims and Scope'] : $aParam['journal_title'];
//根据期刊issn查询期刊ID //根据期刊issn查询期刊ID
$aWhere = ['state' => 0,'issn' => $sIssn]; $aWhere = ['state' => 0,'issn' => $sIssn];