正在显示
4 个修改的文件
包含
5 行增加
和
10 行删除
| @@ -101,13 +101,6 @@ class ProjectUserController extends BaseController | @@ -101,13 +101,6 @@ class ProjectUserController extends BaseController | ||
| 101 | */ | 101 | */ |
| 102 | public function save(UserRequest $request,UserLogic $userLogic){ | 102 | public function save(UserRequest $request,UserLogic $userLogic){ |
| 103 | $request->validated(); | 103 | $request->validated(); |
| 104 | - if(!isset($this->param['id'])){ | ||
| 105 | - $this->request->validate([ | ||
| 106 | - 'password'=>'required', | ||
| 107 | - ],[ | ||
| 108 | - 'password.required' => '密码不能为空', | ||
| 109 | - ]); | ||
| 110 | - } | ||
| 111 | $userLogic->projectUserSave(); | 104 | $userLogic->projectUserSave(); |
| 112 | $this->response('success'); | 105 | $this->response('success'); |
| 113 | } | 106 | } |
| @@ -60,10 +60,8 @@ class UserLogic extends BaseLogic | @@ -60,10 +60,8 @@ class UserLogic extends BaseLogic | ||
| 60 | } | 60 | } |
| 61 | $this->param = $this->editPassword($this->param); | 61 | $this->param = $this->editPassword($this->param); |
| 62 | $rs = $this->model->edit($this->param, ['id' => $this->param['id']]); | 62 | $rs = $this->model->edit($this->param, ['id' => $this->param['id']]); |
| 63 | + DB::table('gl_user_edit_log')->insert(['message'=>json_encode($this->param),'user_id'=>$this->manager['id'],'project_id'=>$this->user['project_id'],'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')]); | ||
| 63 | } else { | 64 | } else { |
| 64 | -// $mobileModel = new Mobile(); | ||
| 65 | -// //查看当前手机号码是否存在于手机号码库 | ||
| 66 | -// $mobileInfo = $mobileModel->read(['mobile'=>$this->param['mobile']]); | ||
| 67 | $this->param['password'] = base64_encode(md5($this->param['password'])); | 65 | $this->param['password'] = base64_encode(md5($this->param['password'])); |
| 68 | $rs = $this->model->add($this->param); | 66 | $rs = $this->model->add($this->param); |
| 69 | } | 67 | } |
| @@ -5,6 +5,7 @@ namespace App\Http\Logic\Bside\User; | @@ -5,6 +5,7 @@ namespace App\Http\Logic\Bside\User; | ||
| 5 | use App\Http\Logic\Bside\BaseLogic; | 5 | use App\Http\Logic\Bside\BaseLogic; |
| 6 | use App\Models\User\DeptUser; | 6 | use App\Models\User\DeptUser; |
| 7 | use App\Models\User\User as UserModel; | 7 | use App\Models\User\User as UserModel; |
| 8 | +use Illuminate\Support\Facades\DB; | ||
| 8 | 9 | ||
| 9 | class DeptUserLogic extends BaseLogic | 10 | class DeptUserLogic extends BaseLogic |
| 10 | { | 11 | { |
| @@ -6,6 +6,7 @@ use App\Enums\Common\Code; | @@ -6,6 +6,7 @@ use App\Enums\Common\Code; | ||
| 6 | use App\Http\Logic\Bside\BaseLogic; | 6 | use App\Http\Logic\Bside\BaseLogic; |
| 7 | use App\Models\User\User; | 7 | use App\Models\User\User; |
| 8 | use Illuminate\Support\Facades\Cache; | 8 | use Illuminate\Support\Facades\Cache; |
| 9 | +use Illuminate\Support\Facades\DB; | ||
| 9 | 10 | ||
| 10 | class UserLogic extends BaseLogic | 11 | class UserLogic extends BaseLogic |
| 11 | { | 12 | { |
| @@ -84,6 +85,8 @@ class UserLogic extends BaseLogic | @@ -84,6 +85,8 @@ class UserLogic extends BaseLogic | ||
| 84 | if($rs === false){ | 85 | if($rs === false){ |
| 85 | $this->fail('系统错误,请联系管理员'); | 86 | $this->fail('系统错误,请联系管理员'); |
| 86 | } | 87 | } |
| 88 | + //todo::写入日志 | ||
| 89 | + DB::table('gl_user_edit_log')->insert(['message'=>json_encode($this->param),'user_id'=>$this->user['id'],'project_id'=>$this->user['project_id'],'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')]); | ||
| 87 | return $this->success(); | 90 | return $this->success(); |
| 88 | } | 91 | } |
| 89 | 92 |
-
请 注册 或 登录 后发表评论