|
...
|
...
|
@@ -32,13 +32,8 @@ class UserLogic extends BaseLogic |
|
|
|
if($info === false){
|
|
|
|
$this->fail('当前数据不存在');
|
|
|
|
}
|
|
|
|
if($info['type'] == 1){
|
|
|
|
$userModel = new UserModel();
|
|
|
|
$info['operator_name'] = $userModel->read(['id'=>$info['operator_id']],['name'])['name'];
|
|
|
|
}else{
|
|
|
|
$managerModel = new Manage();
|
|
|
|
$info['operator_name'] = $managerModel->read(['id'=>$info['operator_id']],['name'])['name'];
|
|
|
|
}
|
|
|
|
$userModel = new UserModel();
|
|
|
|
$info['operator_name'] = $userModel->read(['id'=>$info['operator_id']],['name'])['name'];
|
|
|
|
$info['project_name'] = (new Project())->read(['id'=>$info['project_id']],['title'])['title'];
|
|
|
|
Common::set_user_cache($info,$this->model,$this->param['id'],'A');
|
|
|
|
}
|
|
...
|
...
|
@@ -53,11 +48,6 @@ class UserLogic extends BaseLogic |
|
|
|
public function user_add(){
|
|
|
|
$this->verifyMobile();//验证手机号
|
|
|
|
$this->param['password'] = base64_encode(md5($this->param['password']));
|
|
|
|
//类型
|
|
|
|
$this->param['type'] = 1;
|
|
|
|
//A端操作人
|
|
|
|
$this->param['create_id'] = $this->manager['id'];
|
|
|
|
$this->param['operator_id'] = $this->manager['id'];
|
|
|
|
$rs = $this->model->add($this->param);
|
|
|
|
if($rs === false){
|
|
|
|
$this->fail('添加失败');
|
|
...
|
...
|
@@ -80,7 +70,6 @@ class UserLogic extends BaseLogic |
|
|
|
$this->param['password'] = base64_encode(md5($this->param['password']));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$this->param['operator_id'] = $this->manager['id'];
|
|
|
|
$rs = $this->model->edit($this->param,['id'=>$this->param['id']]);
|
|
|
|
if($rs === false){
|
|
|
|
$this->fail('编辑失败');
|
...
|
...
|
|