Merge branch 'develop' into dc
正在显示
3 个修改的文件
包含
16 行增加
和
5 行删除
| @@ -7,7 +7,6 @@ use App\Http\Controllers\Aside\BaseController; | @@ -7,7 +7,6 @@ use App\Http\Controllers\Aside\BaseController; | ||
| 7 | use App\Http\Logic\Aside\User\ProjectRoleLogic; | 7 | use App\Http\Logic\Aside\User\ProjectRoleLogic; |
| 8 | use App\Http\Requests\Aside\User\ProjectRoleRequest; | 8 | use App\Http\Requests\Aside\User\ProjectRoleRequest; |
| 9 | use App\Models\User\ProjectRole as ProjectRoleModel; | 9 | use App\Models\User\ProjectRole as ProjectRoleModel; |
| 10 | -use Illuminate\Http\Request; | ||
| 11 | 10 | ||
| 12 | /** | 11 | /** |
| 13 | * @remark :b端用户角色设置管理 | 12 | * @remark :b端用户角色设置管理 |
| @@ -45,7 +44,6 @@ class ProjectRoleController extends BaseController | @@ -45,7 +44,6 @@ class ProjectRoleController extends BaseController | ||
| 45 | ],[ | 44 | ],[ |
| 46 | 'id.required' => 'ID不能为空' | 45 | 'id.required' => 'ID不能为空' |
| 47 | ]); | 46 | ]); |
| 48 | - //TODO::详情 | ||
| 49 | $roleLogic->role_info(); | 47 | $roleLogic->role_info(); |
| 50 | $this->response('success'); | 48 | $this->response('success'); |
| 51 | } | 49 | } |
| @@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
| 2 | 2 | ||
| 3 | namespace App\Http\Logic\Aside\User; | 3 | namespace App\Http\Logic\Aside\User; |
| 4 | 4 | ||
| 5 | +use App\Helper\Common; | ||
| 5 | use App\Http\Logic\Aside\BaseLogic; | 6 | use App\Http\Logic\Aside\BaseLogic; |
| 6 | use App\Models\User\ProjectMenu as ProjectMenuModel; | 7 | use App\Models\User\ProjectMenu as ProjectMenuModel; |
| 7 | use App\Models\User\ProjectRole; | 8 | use App\Models\User\ProjectRole; |
| @@ -48,7 +49,15 @@ class ProjectRoleLogic extends BaseLogic | @@ -48,7 +49,15 @@ class ProjectRoleLogic extends BaseLogic | ||
| 48 | * @method | 49 | * @method |
| 49 | */ | 50 | */ |
| 50 | public function role_info(){ | 51 | public function role_info(){ |
| 51 | - $info = $this->info($this->param); | 52 | + $info = Common::get_user_cache($this->model,$this->param['id'],'A'); |
| 53 | + if(empty($info)){ | ||
| 54 | + $filed = ['id','name','project_id','operator_id','created_at','status','updated_at']; | ||
| 55 | + $info = $this->model->read($this->param,$filed); | ||
| 56 | + if($info === false){ | ||
| 57 | + $this->fail('当前数据不存在'); | ||
| 58 | + } | ||
| 59 | + Common::set_user_cache($info,$this->model,$this->param['id'],'A'); | ||
| 60 | + } | ||
| 52 | return $this->success($info); | 61 | return $this->success($info); |
| 53 | } | 62 | } |
| 54 | 63 | ||
| @@ -83,7 +92,11 @@ class ProjectRoleLogic extends BaseLogic | @@ -83,7 +92,11 @@ class ProjectRoleLogic extends BaseLogic | ||
| 83 | if($info !== false){ | 92 | if($info !== false){ |
| 84 | $this->fail('当前菜单名称已存在'); | 93 | $this->fail('当前菜单名称已存在'); |
| 85 | } | 94 | } |
| 86 | - $this->edit($this->param,['id'=>$this->param['id']]); | 95 | + $rs = $this->edit($this->param,['id'=>$this->param['id']]); |
| 96 | + if($rs === false){ | ||
| 97 | + $this->fail('error'); | ||
| 98 | + } | ||
| 99 | + Common::del_user_cache($this->model,$this->param['id'],'A'); | ||
| 87 | return $this->success(); | 100 | return $this->success(); |
| 88 | } | 101 | } |
| 89 | 102 |
| @@ -32,8 +32,8 @@ class UserLogic extends BaseLogic | @@ -32,8 +32,8 @@ class UserLogic extends BaseLogic | ||
| 32 | } | 32 | } |
| 33 | $info['operator_name'] = (new User())->read(['id'=>$info['operator_id']],['name'])['name']; | 33 | $info['operator_name'] = (new User())->read(['id'=>$info['operator_id']],['name'])['name']; |
| 34 | $info['project_name'] = (new Project())->read(['id'=>$info['project_id']],['title'])['title']; | 34 | $info['project_name'] = (new Project())->read(['id'=>$info['project_id']],['title'])['title']; |
| 35 | + Common::set_user_cache($info,$this->model,$this->param['id'],'A'); | ||
| 35 | } | 36 | } |
| 36 | - Common::set_user_cache($info,$this->model,$this->param['id'],'A'); | ||
| 37 | return $this->success($info); | 37 | return $this->success($info); |
| 38 | } | 38 | } |
| 39 | /** | 39 | /** |
-
请 注册 或 登录 后发表评论