This commit is contained in:
wangjinlei
2021-02-25 15:03:13 +08:00
parent 540a2d7579
commit 49979c23f5
3 changed files with 90 additions and 3 deletions

View File

@@ -24,6 +24,7 @@ class Main extends Controller {
protected $article_to_topic_obj = ''; protected $article_to_topic_obj = '';
protected $sys_scient_obj = ''; protected $sys_scient_obj = '';
protected $sys_book_obj = ''; protected $sys_book_obj = '';
protected $sys_not_obj = '';
protected $article_ltai_obj = ''; protected $article_ltai_obj = '';
public function __construct(\think\Request $request = null) { public function __construct(\think\Request $request = null) {
@@ -39,6 +40,7 @@ class Main extends Controller {
$this->article_to_topic_obj = Db::name('article_to_topic'); $this->article_to_topic_obj = Db::name('article_to_topic');
$this->sys_scient_obj = Db::name('system_scient'); $this->sys_scient_obj = Db::name('system_scient');
$this->sys_book_obj = Db::name('system_books'); $this->sys_book_obj = Db::name('system_books');
$this->sys_not_obj = Db::name('system_notices');
$this->article_ltai_obj = Db::name('article_ltai'); $this->article_ltai_obj = Db::name('article_ltai');
} }
@@ -352,6 +354,21 @@ class Main extends Controller {
return jsonError('no highlights'); return jsonError('no highlights');
} }
} }
/**
* @title 获取notices列表
* @description 获取notices列表
* @author wangjinlei
* @url /api/Main/getAllNotices
* @method POST
*
* @return notices:array#
*/
public function getAllNotices(){
$list = $this->sys_not_obj->where('state',0)->order('system_notices_id desc')->select();
$re['notices'] = $list;
return jsonSuccess($re);
}
/** /**
* @title 获取期刊列表 * @title 获取期刊列表

View File

@@ -122,7 +122,6 @@ class Special extends Controller {
* @param name:interests type:string require:0 desc:兴趣 * @param name:interests type:string require:0 desc:兴趣
* @param name:website type:string require:0 desc:编辑主页 * @param name:website type:string require:0 desc:编辑主页
* @param name:orcid type:string require:0 desc:orcid * @param name:orcid type:string require:0 desc:orcid
*
*/ */
public function addEditor(){ public function addEditor(){
$data = $this->request->post(); $data = $this->request->post();
@@ -209,7 +208,7 @@ class Special extends Controller {
->where('j_journal_special_to_editor.state',0) ->where('j_journal_special_to_editor.state',0)
->select(); ->select();
foreach ($caches as $val){ foreach ($caches as $val){
$frag .= $frag == ''?$val['first_name'].' '.$val['last_name']:','.$val['first_name'].' '.$val['last_name']; $frag .= $frag == ''?$val['first_name'].' '.$val['last_name']:', '.$val['first_name'].' '.$val['last_name'];
} }
$list[$k]['editor'] = $frag; $list[$k]['editor'] = $frag;
} }
@@ -243,7 +242,6 @@ class Special extends Controller {
->where('j_journal_special_to_editor.journal_special_id',$data['journal_special_id']) ->where('j_journal_special_to_editor.journal_special_id',$data['journal_special_id'])
->where('j_journal_special_to_editor.state',0) ->where('j_journal_special_to_editor.state',0)
->select(); ->select();
$re['keywords'] = explode(';', $info['keywords']); $re['keywords'] = explode(';', $info['keywords']);
$re['journal'] = $journal_info; $re['journal'] = $journal_info;
$re['special'] = $info; $re['special'] = $info;

View File

@@ -16,6 +16,7 @@ class Mysystem extends Controller {
protected $sys_abs_obj = ''; protected $sys_abs_obj = '';
protected $sys_scient_obj = ''; protected $sys_scient_obj = '';
protected $sys_book_obj = ''; protected $sys_book_obj = '';
protected $sys_not_obj = '';
public function __construct(\think\Request $request = null) { public function __construct(\think\Request $request = null) {
parent::__construct($request); parent::__construct($request);
@@ -24,6 +25,7 @@ class Mysystem extends Controller {
$this->sys_abs_obj = Db::name('system_abstracting'); $this->sys_abs_obj = Db::name('system_abstracting');
$this->sys_scient_obj = Db::name('system_scient'); $this->sys_scient_obj = Db::name('system_scient');
$this->sys_book_obj = Db::name('system_books'); $this->sys_book_obj = Db::name('system_books');
$this->sys_not_obj = Db::name('system_notices');
} }
/** /**
@@ -381,6 +383,76 @@ class Mysystem extends Controller {
return jsonSuccess($re); return jsonSuccess($re);
} }
/**
* @title 增加出版集团消息
* @description 增加出版集团消息
* @author wangjinlei
* @url /master/Mysystem/addNotices
* @method POST
*
* @param name:title type:string require:1 desc:消息标题
* @param name:content type:string require:1 desc:内容
* @param name:ctime type:string require:1 desc:时间
*/
public function addNotices(){
$data = $this->request->post();
$insert['title'] = $data['title'];
$insert['content'] = $data['content'];
$insert['ctime'] = $data['ctime']==''?time():strtotime($data['ctime']);
$this->sys_not_obj->insert($insert);
return jsonSuccess([]);
}
/**
* @title 删除出版集团消息
* @description 删除出版集团消息
* @author wangjinlei
* @url /master/Mysystem/delNotices
* @method POST
*
* @param name:system_notices_id type:int require:1 desc:消息id
*/
public function delNotices(){
$data = $this->request->post();
$this->sys_not_obj->where('system_notices_id',$data['system_notices_id'])->update(['state'=>1]);
return jsonSuccess([]);
}
/**
* @title 编辑出版集团消息
* @description 编辑出版集团消息
* @author wangjinlei
* @url /master/Mysystem/editNotices
* @method POST
*
* @param name:system_notices_id type:int require:1 desc:消息标题
* @param name:title type:string require:1 desc:消息标题
* @param name:content type:string require:1 desc:内容
*/
public function editNotices(){
$data = $this->request->post();
$update['title'] = $data['title'];
$update['content'] = $data['content'];
$this->sys_not_obj->where('system_notices_id',$data['system_notices_id'])->update($update);
return jsonSuccess([]);
}
/**
* @title 获取出版集团消息
* @description 获取出版集团消息
* @author wangjinlei
* @url /master/Mysystem/getNotices
* @method POST
*
* @return notices:消息array#
*/
public function getNotices(){
$data = $this->request->post();
$list = $this->sys_not_obj->where('state',0)->select();
$re['notices'] = $list;
return jsonSuccess($re);
}
/** /**
* @title pdf上传 * @title pdf上传
* @description pdf上传 * @description pdf上传