|
...
|
...
|
@@ -58,6 +58,13 @@ class UserLogic extends BaseLogic |
|
|
|
$projectModel = new Project();
|
|
|
|
$projectModel->edit(['lead_name'=>$this->param['name'],'mobile'=>$this->param['mobile']],['id'=>$info['project_id']]);
|
|
|
|
}
|
|
|
|
if(isset($this->param['role_id']) && ($this->param['role_id'] != 0)){
|
|
|
|
$roleModel = new ProjectRole();
|
|
|
|
$roleInfo = $roleModel->read(['project_id'=>$info['project_id'],'id'=>$this->param['role_id']]);
|
|
|
|
if($roleInfo == false){
|
|
|
|
$this->fail('当前角色不是当前项目角色');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$this->param = $this->editPassword($this->param);
|
|
|
|
$rs = $this->model->edit($this->param, ['id' => $this->param['id']]);
|
|
|
|
} else {
|
|
...
|
...
|
@@ -196,10 +203,10 @@ class UserLogic extends BaseLogic |
|
|
|
*/
|
|
|
|
public function setRole(){
|
|
|
|
DB::beginTransaction();
|
|
|
|
//获取当前用户的觉得
|
|
|
|
//获取当前用户的角色
|
|
|
|
$roleModel = new ProjectRole();
|
|
|
|
$roleInfo = $roleModel->where('project_id',$this->param['project_id'])->orderBy('id','asc')->first();
|
|
|
|
$info = $this->model->read(['role_id'=>0]);
|
|
|
|
$info = $this->model->read(['role_id'=>0,'project_id'=>$this->param['project_id']]);
|
|
|
|
if(empty($info) || empty($roleInfo)){
|
|
|
|
$this->fail('请先添加角色');
|
|
|
|
}
|
...
|
...
|
|