|
@@ -32,13 +32,8 @@ class UserLogic extends BaseLogic |
|
@@ -32,13 +32,8 @@ class UserLogic extends BaseLogic |
|
32
|
if($info === false){
|
32
|
if($info === false){
|
|
33
|
$this->fail('当前数据不存在');
|
33
|
$this->fail('当前数据不存在');
|
|
34
|
}
|
34
|
}
|
|
35
|
- if($info['type'] == 1){
|
|
|
|
36
|
- $userModel = new UserModel();
|
|
|
|
37
|
- $info['operator_name'] = $userModel->read(['id'=>$info['operator_id']],['name'])['name'];
|
|
|
|
38
|
- }else{
|
|
|
|
39
|
- $managerModel = new Manage();
|
|
|
|
40
|
- $info['operator_name'] = $managerModel->read(['id'=>$info['operator_id']],['name'])['name'];
|
|
|
|
41
|
- }
|
35
|
+ $userModel = new UserModel();
|
|
|
|
36
|
+ $info['operator_name'] = $userModel->read(['id'=>$info['operator_id']],['name'])['name'];
|
|
42
|
$info['project_name'] = (new Project())->read(['id'=>$info['project_id']],['title'])['title'];
|
37
|
$info['project_name'] = (new Project())->read(['id'=>$info['project_id']],['title'])['title'];
|
|
43
|
Common::set_user_cache($info,$this->model,$this->param['id'],'A');
|
38
|
Common::set_user_cache($info,$this->model,$this->param['id'],'A');
|
|
44
|
}
|
39
|
}
|
|
@@ -53,11 +48,6 @@ class UserLogic extends BaseLogic |
|
@@ -53,11 +48,6 @@ class UserLogic extends BaseLogic |
|
53
|
public function user_add(){
|
48
|
public function user_add(){
|
|
54
|
$this->verifyMobile();//验证手机号
|
49
|
$this->verifyMobile();//验证手机号
|
|
55
|
$this->param['password'] = base64_encode(md5($this->param['password']));
|
50
|
$this->param['password'] = base64_encode(md5($this->param['password']));
|
|
56
|
- //类型
|
|
|
|
57
|
- $this->param['type'] = 1;
|
|
|
|
58
|
- //A端操作人
|
|
|
|
59
|
- $this->param['create_id'] = $this->manager['id'];
|
|
|
|
60
|
- $this->param['operator_id'] = $this->manager['id'];
|
|
|
|
61
|
$rs = $this->model->add($this->param);
|
51
|
$rs = $this->model->add($this->param);
|
|
62
|
if($rs === false){
|
52
|
if($rs === false){
|
|
63
|
$this->fail('添加失败');
|
53
|
$this->fail('添加失败');
|
|
@@ -80,7 +70,6 @@ class UserLogic extends BaseLogic |
|
@@ -80,7 +70,6 @@ class UserLogic extends BaseLogic |
|
80
|
$this->param['password'] = base64_encode(md5($this->param['password']));
|
70
|
$this->param['password'] = base64_encode(md5($this->param['password']));
|
|
81
|
}
|
71
|
}
|
|
82
|
}
|
72
|
}
|
|
83
|
- $this->param['operator_id'] = $this->manager['id'];
|
|
|
|
84
|
$rs = $this->model->edit($this->param,['id'=>$this->param['id']]);
|
73
|
$rs = $this->model->edit($this->param,['id'=>$this->param['id']]);
|
|
85
|
if($rs === false){
|
74
|
if($rs === false){
|
|
86
|
$this->fail('编辑失败');
|
75
|
$this->fail('编辑失败');
|