|
@@ -3,6 +3,7 @@ |
|
@@ -3,6 +3,7 @@ |
|
3
|
namespace App\Http\Logic\Aside\Manage;
|
3
|
namespace App\Http\Logic\Aside\Manage;
|
|
4
|
|
4
|
|
|
5
|
|
5
|
|
|
|
|
6
|
+use App\Helper\Arr;
|
|
6
|
use App\Helper\Common;
|
7
|
use App\Helper\Common;
|
|
7
|
use App\Http\Logic\Aside\BaseLogic;
|
8
|
use App\Http\Logic\Aside\BaseLogic;
|
|
8
|
use App\Models\Manage\Manage;
|
9
|
use App\Models\Manage\Manage;
|
|
@@ -59,6 +60,9 @@ class ManageLogic extends BaseLogic |
|
@@ -59,6 +60,9 @@ class ManageLogic extends BaseLogic |
|
59
|
if($managerInfo !== false){
|
60
|
if($managerInfo !== false){
|
|
60
|
$this->fail('当前手机号码已存在');
|
61
|
$this->fail('当前手机号码已存在');
|
|
61
|
}
|
62
|
}
|
|
|
|
63
|
+ if (isset($this->param['rules']) && is_array($this->param['rules'])){
|
|
|
|
64
|
+ $this->param['rules'] = Arr::arrToSet($this->param['rules']);
|
|
|
|
65
|
+ }
|
|
62
|
$this->param['password'] = Hash::make(isset($this->param['password']) ?? 'globalsov6');
|
66
|
$this->param['password'] = Hash::make(isset($this->param['password']) ?? 'globalsov6');
|
|
63
|
$this->model->add($this->param);
|
67
|
$this->model->add($this->param);
|
|
64
|
$this->success();
|
68
|
$this->success();
|
|
@@ -93,6 +97,9 @@ class ManageLogic extends BaseLogic |
|
@@ -93,6 +97,9 @@ class ManageLogic extends BaseLogic |
|
93
|
if(isset($this->param['password']) && !empty($this->param['password'])){
|
97
|
if(isset($this->param['password']) && !empty($this->param['password'])){
|
|
94
|
$this->param['password'] = Hash::make($this->param['password']);
|
98
|
$this->param['password'] = Hash::make($this->param['password']);
|
|
95
|
}
|
99
|
}
|
|
|
|
100
|
+ if (isset($this->param['rules']) && is_array($this->param['rules'])){
|
|
|
|
101
|
+ $this->param['rules'] = Arr::arrToSet($this->param['rules']);
|
|
|
|
102
|
+ }
|
|
96
|
$this->model->edit($this->param,['id'=>$this->param['id']]);
|
103
|
$this->model->edit($this->param,['id'=>$this->param['id']]);
|
|
97
|
}
|
104
|
}
|
|
98
|
|
105
|
|
|
@@ -120,7 +127,7 @@ class ManageLogic extends BaseLogic |
|
@@ -120,7 +127,7 @@ class ManageLogic extends BaseLogic |
|
120
|
*/
|
127
|
*/
|
|
121
|
public function getManagerInfo(){
|
128
|
public function getManagerInfo(){
|
|
122
|
$info = $this->model->read(['id'=>$this->param['id']],
|
129
|
$info = $this->model->read(['id'=>$this->param['id']],
|
|
123
|
- ['id','name','email','mobile','status','gid','sort','dept_id','is_dept_manager','created_at','role','updated_at']);
|
130
|
+ ['id','name','email','mobile','status','gid','sort','dept_id','is_dept_manager','created_at','role','rules','updated_at']);
|
|
124
|
if($info === false){
|
131
|
if($info === false){
|
|
125
|
$this->fail('error');
|
132
|
$this->fail('error');
|
|
126
|
}
|
133
|
}
|