Compare commits
2 Commits
3272063fc0
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 7970be6fd7 | |||
| 160f4c3791 |
@@ -130,6 +130,37 @@ class Special extends Controller {
|
||||
$re['specials'] = $list;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 根据ISSN查询期刊ID
|
||||
* @description 根据ISSN查询期刊ID
|
||||
* @url /master/Special/getJournalIdByIssn
|
||||
* @method POST
|
||||
*
|
||||
* @param name:issn type:string require:1 desc:期刊ISSN
|
||||
*
|
||||
* @return journal_id:期刊id
|
||||
*/
|
||||
public function getJournalIdByIssn(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
'issn' => 'require',
|
||||
]);
|
||||
if (!$rule->check($data)) {
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$issn = trim($data['issn']);
|
||||
$journal = $this->journal_obj
|
||||
->field('journal_id')
|
||||
->where('issn', $issn)
|
||||
->find();
|
||||
if (!$journal) {
|
||||
return jsonError('journal not found');
|
||||
}
|
||||
return jsonSuccess([
|
||||
'journal_id' => intval($journal['journal_id']),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 客座期刊(更改状态)
|
||||
|
||||
Reference in New Issue
Block a user