|
...
|
...
|
@@ -2,6 +2,7 @@ |
|
|
|
|
|
|
|
namespace App\Http\Logic\Aside\User;
|
|
|
|
|
|
|
|
use App\Helper\Common;
|
|
|
|
use App\Http\Logic\Aside\BaseLogic;
|
|
|
|
use App\Models\User\ProjectMenu as ProjectMenuModel;
|
|
|
|
use App\Models\User\ProjectRole;
|
|
...
|
...
|
@@ -48,7 +49,15 @@ class ProjectRoleLogic extends BaseLogic |
|
|
|
* @method
|
|
|
|
*/
|
|
|
|
public function role_info(){
|
|
|
|
$info = $this->info($this->param);
|
|
|
|
$info = Common::get_user_cache($this->model,$this->param['id'],'A');
|
|
|
|
if(empty($info)){
|
|
|
|
$filed = ['id','name','project_id','operator_id','created_at','status','updated_at'];
|
|
|
|
$info = $this->model->read($this->param,$filed);
|
|
|
|
if($info === false){
|
|
|
|
$this->fail('当前数据不存在');
|
|
|
|
}
|
|
|
|
Common::set_user_cache($info,$this->model,$this->param['id'],'A');
|
|
|
|
}
|
|
|
|
return $this->success($info);
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -83,7 +92,11 @@ class ProjectRoleLogic extends BaseLogic |
|
|
|
if($info !== false){
|
|
|
|
$this->fail('当前菜单名称已存在');
|
|
|
|
}
|
|
|
|
$this->edit($this->param,['id'=>$this->param['id']]);
|
|
|
|
$rs = $this->edit($this->param,['id'=>$this->param['id']]);
|
|
|
|
if($rs === false){
|
|
|
|
$this->fail('error');
|
|
|
|
}
|
|
|
|
Common::del_user_cache($this->model,$this->param['id'],'A');
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|