1
This commit is contained in:
@@ -598,10 +598,12 @@ class Board extends Controller {
|
|||||||
$cs['board_id'] = $data['jboard_id'];
|
$cs['board_id'] = $data['jboard_id'];
|
||||||
$cs['email'] = $data['email'];
|
$cs['email'] = $data['email'];
|
||||||
$list = myPost($url, $cs);
|
$list = myPost($url, $cs);
|
||||||
|
$check = $this->board_to_journal_obj->where('user_id',$data['user_id'])->where('journal_id',$data['journal_id'])->where('state',0)->find();
|
||||||
|
if(!$check){
|
||||||
$insert['user_id'] = $data['user_id'];
|
$insert['user_id'] = $data['user_id'];
|
||||||
$insert['journal_id'] = $data['journal_id'];
|
$insert['journal_id'] = $data['journal_id'];
|
||||||
$this->board_to_journal_obj->insert($insert);
|
$this->board_to_journal_obj->insert($insert);
|
||||||
|
}
|
||||||
return jsonSuccess([]);
|
return jsonSuccess([]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -448,25 +448,26 @@ class Chief extends Controller {
|
|||||||
* @param name:phone type:string require:0 desc:电话
|
* @param name:phone type:string require:0 desc:电话
|
||||||
*/
|
*/
|
||||||
public function addJournalBoard(){
|
public function addJournalBoard(){
|
||||||
$data = $this->request->post();
|
return jsonError('Service Stop');
|
||||||
$check = $this->user_obj->where('account',trim($data['account']))->where('email',trim($data['email']))->where('state',0)->find();
|
// $data = $this->request->post();
|
||||||
if($check){
|
// $check = $this->user_obj->where('account',trim($data['account']))->where('email',trim($data['email']))->where('state',0)->find();
|
||||||
return jsonError('Account or Email has been register!');
|
// if($check){
|
||||||
}
|
// return jsonError('Account or Email has been register!');
|
||||||
$insert['account'] = trim($data['account']);
|
// }
|
||||||
$insert['email'] = trim($data['email']);
|
// $insert['account'] = trim($data['account']);
|
||||||
$insert['password'] = md5(trim($data['password']));
|
// $insert['email'] = trim($data['email']);
|
||||||
$insert['realname'] = isset($data['realname'])?trim($data['realname']):'';
|
// $insert['password'] = md5(trim($data['password']));
|
||||||
$insert['phone'] = isset($data['phone'])?trim($data['phone']):'';
|
// $insert['realname'] = isset($data['realname'])?trim($data['realname']):'';
|
||||||
$insert['type'] = 4;
|
// $insert['phone'] = isset($data['phone'])?trim($data['phone']):'';
|
||||||
$insert['ctime'] = time();
|
// $insert['type'] = 4;
|
||||||
$uid = $this->user_obj->insertGetId($insert);
|
// $insert['ctime'] = time();
|
||||||
//添加对应关系
|
// $uid = $this->user_obj->insertGetId($insert);
|
||||||
$to_insert['user_id'] = $uid;
|
// //添加对应关系
|
||||||
$to_insert['journal_id'] = $data['journal_id'];
|
// $to_insert['user_id'] = $uid;
|
||||||
$this->board_to_journal_obj->insert($to_insert);
|
// $to_insert['journal_id'] = $data['journal_id'];
|
||||||
|
// $this->board_to_journal_obj->insert($to_insert);
|
||||||
|
|
||||||
return jsonSuccess([]);
|
// return jsonSuccess([]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -480,15 +481,18 @@ class Chief extends Controller {
|
|||||||
* @param name:journal_id type:int require:1 desc:期刊id
|
* @param name:journal_id type:int require:1 desc:期刊id
|
||||||
*/
|
*/
|
||||||
public function addJournalBoardHas(){
|
public function addJournalBoardHas(){
|
||||||
$data = $this->request->post();
|
return jsonError('Service Stop');
|
||||||
$check = $this->board_to_journal_obj->where('user_id',$data['user_id'])->where('journal_id',$data['journal_id'])->where('state',0)->find();
|
|
||||||
if($check!=null){
|
|
||||||
return jsonError('has register!');
|
// $data = $this->request->post();
|
||||||
}
|
// $check = $this->board_to_journal_obj->where('user_id',$data['user_id'])->where('journal_id',$data['journal_id'])->where('state',0)->find();
|
||||||
$insert['journal_id'] = $data['journal_id'];
|
// if($check!=null){
|
||||||
$insert['user_id'] = $data['user_id'];
|
// return jsonError('has register!');
|
||||||
$this->board_to_journal_obj->insert($insert);
|
// }
|
||||||
return jsonSuccess([]);
|
// $insert['journal_id'] = $data['journal_id'];
|
||||||
|
// $insert['user_id'] = $data['user_id'];
|
||||||
|
// $this->board_to_journal_obj->insert($insert);
|
||||||
|
// return jsonSuccess([]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user