1
This commit is contained in:
@@ -2,49 +2,16 @@
|
||||
|
||||
namespace app\api\controller;
|
||||
|
||||
use think\Controller;
|
||||
use think\Db;
|
||||
use app\api\controller\Base;
|
||||
use think\Validate;
|
||||
|
||||
|
||||
class Ucenter extends Controller{
|
||||
class Ucenter extends Base{
|
||||
|
||||
protected $user_obj = '';
|
||||
protected $user_reviewer_info_obj = '';
|
||||
protected $journal_obj = '';
|
||||
protected $reviewer_to_journal_obj = '';
|
||||
protected $article_reviewer_obj = '';
|
||||
protected $article_obj = '';
|
||||
protected $chief_to_journal_obj = '';
|
||||
protected $board_to_journal_obj = '';
|
||||
protected $major_obj = "";
|
||||
protected $major_to_journal_obj = '';
|
||||
protected $user_cv_obj = '';
|
||||
protected $apply_board_obj = '';
|
||||
protected $apply_yboard_obj = '';
|
||||
protected $user_score_log_obj = '';
|
||||
protected $user_index_log_obj = '';
|
||||
protected $user_to_yboard_obj = '';
|
||||
|
||||
public function __construct(\think\Request $request = null)
|
||||
{
|
||||
parent::__construct($request);
|
||||
$this->user_obj = Db::name('user');
|
||||
$this->user_reviewer_info_obj = Db::name("user_reviewer_info");
|
||||
$this->journal_obj = Db::name('journal');
|
||||
$this->reviewer_to_journal_obj = Db::name('reviewer_to_journal');
|
||||
$this->article_reviewer_obj = Db::name('article_reviewer');
|
||||
$this->article_obj = Db::name('article');
|
||||
$this->chief_to_journal_obj = Db::name('chief_to_journal');
|
||||
$this->board_to_journal_obj = Db::name('board_to_journal');
|
||||
$this->major_obj = Db::name("major");
|
||||
$this->major_to_journal_obj = Db::name('major_to_journal');
|
||||
$this->user_cv_obj = Db::name('user_cv');
|
||||
$this->apply_board_obj = Db::name('apply_board');
|
||||
$this->apply_yboard_obj = Db::name('apply_yboard');
|
||||
$this->user_score_log_obj = Db::name('user_score_log');
|
||||
$this->user_index_log_obj = Db::name('user_index_log');
|
||||
$this->user_to_yboard_obj = Db::name('user_to_yboard');
|
||||
}
|
||||
|
||||
|
||||
@@ -81,6 +48,8 @@ class Ucenter extends Controller{
|
||||
->where('t_user.user_id',$data['user_id'])
|
||||
->find();
|
||||
|
||||
$userInfo['baseInfo']['majorshu'] = $userInfo['baseInfo']['major']==0?'':getMajorShu($userInfo['baseInfo']['major']);
|
||||
$userInfo['baseInfo']['majorStr'] = $userInfo['baseInfo']['major']==0?'':getMajorStr($userInfo['baseInfo']['major']);
|
||||
//cv信息
|
||||
$cvs = $this->user_cv_obj->where('user_id',$data['user_id'])->where('state',0)->select();
|
||||
$userInfo['cvs'] = $cvs;
|
||||
@@ -253,13 +222,14 @@ class Ucenter extends Controller{
|
||||
if(isset($data['phone'])&&$data['phone']!=''){
|
||||
$update['phone'] = $data['phone'];
|
||||
}
|
||||
$update['localname'] = isset($data['localname'])?trim($data['localname']):'';
|
||||
$this->user_obj->where(['user_id'=>$data['user_id']])->update($update);
|
||||
$updata1=[
|
||||
'technical'=>$data['technical'],
|
||||
'country'=>$data['country'],
|
||||
'major'=>$data['major'],
|
||||
'field'=>$data['field'],
|
||||
'introduction'=>$data['introduction'],
|
||||
'introduction'=>isset($data['introduction'])?$data['introduction']:'',
|
||||
'company'=>$data['company']
|
||||
];
|
||||
$this->user_reviewer_info_obj->where(['reviewer_id'=>$data['user_id']])->update($updata1);
|
||||
@@ -414,7 +384,7 @@ class Ucenter extends Controller{
|
||||
// 获取审稿人基本信息
|
||||
$res = $this->user_reviewer_info_obj->where(['reviewer_id'=>$userId])->find();
|
||||
|
||||
$res['majors'] = self::getMajorShu($res['major']);
|
||||
$res['majors'] = getMajorShu($res['major']);
|
||||
|
||||
|
||||
// 获取审稿人期刊
|
||||
@@ -430,19 +400,6 @@ class Ucenter extends Controller{
|
||||
return $res;
|
||||
}
|
||||
|
||||
private function getMajorShu($major){
|
||||
if($major==0){
|
||||
return ;
|
||||
}
|
||||
$res = $this->major_obj->where('major_id',$major)->find();
|
||||
if($res['pid']==1){
|
||||
return $res['major_id'];
|
||||
}
|
||||
|
||||
$p = self::getMajorShu($res['pid']);
|
||||
return $p.','.$res['major_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes: 编辑的期刊资料
|
||||
* User: wangzhaocui
|
||||
|
||||
Reference in New Issue
Block a user