major 小版本更新
This commit is contained in:
@@ -237,6 +237,28 @@ class Base extends Controller
|
|||||||
return $frag;
|
return $frag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $user_id
|
||||||
|
* @param $majors "1,2,3"
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function updateUserMajor($user_id,$majors){
|
||||||
|
$news = explode(",",$majors);
|
||||||
|
$has = $this->major_to_user_obj->where("user_id",$user_id)->where("state",0)->column("major_id");
|
||||||
|
$del_list = array_diff($has,$news);
|
||||||
|
$update_list = array_diff($news,$has);
|
||||||
|
foreach ($del_list as $v){
|
||||||
|
$this->major_to_user_obj->where("user_id",$user_id)->where("major_id",$v)->update(['state'=>1]);
|
||||||
|
}
|
||||||
|
foreach ($update_list as $v){
|
||||||
|
$insert['user_id'] = $user_id;
|
||||||
|
$insert['major_id'] = $v;
|
||||||
|
$insert['ctime'] = time();
|
||||||
|
$this->major_to_user_obj->insert($insert);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function delOneRefer($p_refer_id)
|
public function delOneRefer($p_refer_id)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -762,7 +762,7 @@ class Preaccept extends Base
|
|||||||
}
|
}
|
||||||
$order_info['paystation'] = $paystation;
|
$order_info['paystation'] = $paystation;
|
||||||
}
|
}
|
||||||
$re['state'] = $order_info?$order_info['state']:0;
|
$re['state'] = $order_info?$order_info['state']:$article_info['is_buy'];
|
||||||
$re['fee'] = $journal_info['fee'];
|
$re['fee'] = $journal_info['fee'];
|
||||||
$re['order'] = $order_info;
|
$re['order'] = $order_info;
|
||||||
return jsonSuccess($re);
|
return jsonSuccess($re);
|
||||||
|
|||||||
@@ -1314,6 +1314,7 @@ class Production extends Base
|
|||||||
|
|
||||||
$typesetInfo['author'] = $au_res['author'];
|
$typesetInfo['author'] = $au_res['author'];
|
||||||
$typesetInfo['authorAddress'] = $au_res['address'];
|
$typesetInfo['authorAddress'] = $au_res['address'];
|
||||||
|
$typesetInfo['authorAddressList'] = $au_res['addressList1'];
|
||||||
$typesetInfo['authorContribution'] = $p_info['author_contribution'];
|
$typesetInfo['authorContribution'] = $p_info['author_contribution'];
|
||||||
|
|
||||||
//查询通讯作者
|
//查询通讯作者
|
||||||
@@ -1371,19 +1372,21 @@ class Production extends Base
|
|||||||
if($item['type']==1){
|
if($item['type']==1){
|
||||||
$info = $this->article_main_image_obj->where("ami_id",$item['ami_id'])->find();
|
$info = $this->article_main_image_obj->where("ami_id",$item['ami_id'])->find();
|
||||||
$arr['image'] = $info['url'];
|
$arr['image'] = $info['url'];
|
||||||
|
$arr['title'] = "<r>".$info['title']."</r>";
|
||||||
$arr['note'] = $info['note'];
|
$arr['note'] = $info['note'];
|
||||||
$images[$info['ami_id']] = $arr;
|
$images[$info['ami_id']] = $arr;
|
||||||
$main_string = "<img src='https://submission.tmrjournals.com/public/articleImage/".$info['url']."' imageId='".$info['ami_id']."'/>";
|
$main_string = "<img src='https://submission.tmrjournals.com/public/articleImage/".$info['url']."' imageId='".$info['ami_id']."'/>";
|
||||||
}else if($item['type']==2){
|
}else if($item['type']==2){
|
||||||
$info = $this->article_main_table_obj->where("amt_id",$item['amt_id'])->find();
|
$info = $this->article_main_table_obj->where("amt_id",$item['amt_id'])->find();
|
||||||
$arr_table['title'] = $info['title'];
|
$arr_table['title'] = "<t>".strip_tags($info['title'])."</t>";
|
||||||
$arr_table['table_data'] = $info['table_data'];
|
$arr_table['table_data'] = $info['table_data'];
|
||||||
$arr_table['note'] = $info['note'];
|
$arr_table['note'] = $info['note'];
|
||||||
$tables[$info['amt_id']] = $arr_table;
|
$tables[$info['amt_id']] = $arr_table;
|
||||||
$main_string = "<table tableId='".$info['amt_id']."'/>";
|
$main_string = "<table tableId='".$info['amt_id']."'/>";
|
||||||
}else{
|
}else{
|
||||||
if($item['is_h1']==1){
|
if($item['is_h1']==1){
|
||||||
$main_string = "<b><i>".$item['content']."</i></b>";
|
// $main_string = "<b><i>".$item['content']."</i></b>";
|
||||||
|
$main_string = "<tr>".strip_tags($item['content'])."</tr>";
|
||||||
}else if($item['is_h2']==1||$item['is_h3']==1){
|
}else if($item['is_h2']==1||$item['is_h3']==1){
|
||||||
$main_string = "<b>".$item['content']."</b>";
|
$main_string = "<b>".$item['content']."</b>";
|
||||||
}else{
|
}else{
|
||||||
@@ -2190,12 +2193,18 @@ class Production extends Base
|
|||||||
}
|
}
|
||||||
//组装address
|
//组装address
|
||||||
$address_str = '';
|
$address_str = '';
|
||||||
|
$address1 = [];
|
||||||
foreach ($address as $k => $v) {
|
foreach ($address as $k => $v) {
|
||||||
$address_str .= ($k + 1) . ' ' . $v . ' ';
|
$address_str .= ($k + 1) . ' ' . $v . ' ';
|
||||||
|
$address1[] = [
|
||||||
|
"k"=>$k + 1,
|
||||||
|
"content"=>$v
|
||||||
|
];
|
||||||
}
|
}
|
||||||
$frag['author'] = $author;
|
$frag['author'] = $author;
|
||||||
$frag['address'] = $address_str;
|
$frag['address'] = $address_str;
|
||||||
$frag['addressList'] = $address;
|
$frag['addressList'] = $address;
|
||||||
|
$frag['addressList1'] = $address1;
|
||||||
return $frag;
|
return $frag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -59,8 +59,8 @@ class Ucenter extends Base{
|
|||||||
->where('t_user.user_id',$data['user_id'])
|
->where('t_user.user_id',$data['user_id'])
|
||||||
->find();
|
->find();
|
||||||
//获取用户的领域
|
//获取用户的领域
|
||||||
$userInfo['baseInfo']['majorshu'] = $userInfo['baseInfo']['major']==0?'':getMajorShu($userInfo['baseInfo']['major']);
|
// $userInfo['baseInfo']['majorshu'] = $userInfo['baseInfo']['major']==0?'':getMajorShu($userInfo['baseInfo']['major']);
|
||||||
$userInfo['baseInfo']['majorStr'] = $userInfo['baseInfo']['major']==0?'':getMajorStr($userInfo['baseInfo']['major']);
|
// $userInfo['baseInfo']['majorStr'] = $userInfo['baseInfo']['major']==0?'':getMajorStr($userInfo['baseInfo']['major']);
|
||||||
$majors = $this->major_to_user_obj->where("user_id",$data['user_id'])->where("state",0)->select();
|
$majors = $this->major_to_user_obj->where("user_id",$data['user_id'])->where("state",0)->select();
|
||||||
foreach ($majors as $k => $v){
|
foreach ($majors as $k => $v){
|
||||||
$majors[$k]['shu'] = $this->getMajorShu($v['major_id']);
|
$majors[$k]['shu'] = $this->getMajorShu($v['major_id']);
|
||||||
@@ -354,7 +354,7 @@ class Ucenter extends Base{
|
|||||||
'realname'=>'require',
|
'realname'=>'require',
|
||||||
'technical'=>'require',
|
'technical'=>'require',
|
||||||
'country'=>'require',
|
'country'=>'require',
|
||||||
'major'=>'require|number',
|
'major'=>'require',
|
||||||
'field'=>'require'
|
'field'=>'require'
|
||||||
]);
|
]);
|
||||||
if(!$rule->check($data)){
|
if(!$rule->check($data)){
|
||||||
@@ -369,17 +369,24 @@ class Ucenter extends Base{
|
|||||||
$updata1=[
|
$updata1=[
|
||||||
'technical'=>$data['technical'],
|
'technical'=>$data['technical'],
|
||||||
'country'=>$data['country'],
|
'country'=>$data['country'],
|
||||||
'major'=>$data['major'],
|
// 'major'=>$data['major'],
|
||||||
'field'=>$data['field'],
|
'field'=>$data['field'],
|
||||||
'introduction'=>isset($data['introduction'])?$data['introduction']:'',
|
'introduction'=>isset($data['introduction'])?$data['introduction']:'',
|
||||||
"website"=>isset($data['website'])?$data["website"]:"",
|
"website"=>isset($data['website'])?$data["website"]:"",
|
||||||
'company'=>$data['company']
|
'company'=>$data['company']
|
||||||
];
|
];
|
||||||
$this->user_reviewer_info_obj->where(['reviewer_id'=>$data['user_id']])->update($updata1);
|
$this->user_reviewer_info_obj->where(['reviewer_id'=>$data['user_id']])->update($updata1);
|
||||||
|
self::updateUserMajor($data['user_id'],$data['major']);
|
||||||
return jsonSuccess([]);
|
return jsonSuccess([]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function up_test(){
|
||||||
|
$res = self::updateUserMajor(20837,"16,14");
|
||||||
|
return jsonSuccess($res);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notes: 修改 asReviewe 信息
|
* Notes: 修改 asReviewe 信息
|
||||||
* User: wangzhaocui
|
* User: wangzhaocui
|
||||||
|
|||||||
Reference in New Issue
Block a user