正在显示
1 个修改的文件
包含
3 行增加
和
3 行删除
| @@ -29,15 +29,15 @@ class UserLogic extends BaseLogic | @@ -29,15 +29,15 @@ class UserLogic extends BaseLogic | ||
| 29 | */ | 29 | */ |
| 30 | public function user_info() | 30 | public function user_info() |
| 31 | { | 31 | { |
| 32 | -// $info = Common::get_user_cache($this->model, $this->param['id'], 'A'); | ||
| 33 | -// if (empty($info)) { | 32 | + $info = Common::get_user_cache($this->model, $this->param['id'], 'A'); |
| 33 | + if (empty($info)) { | ||
| 34 | $info = $this->model->read($this->param, ['id', 'project_id', 'name', 'status', 'role_id' ,'mobile', 'operator_id']); | 34 | $info = $this->model->read($this->param, ['id', 'project_id', 'name', 'status', 'role_id' ,'mobile', 'operator_id']); |
| 35 | if ($info === false) { | 35 | if ($info === false) { |
| 36 | $this->fail('当前数据不存在'); | 36 | $this->fail('当前数据不存在'); |
| 37 | } | 37 | } |
| 38 | $info['project_name'] = (new Project())->read(['id' => $info['project_id']], ['title'])['title']; | 38 | $info['project_name'] = (new Project())->read(['id' => $info['project_id']], ['title'])['title']; |
| 39 | Common::set_user_cache($info, $this->model, $this->param['id'], 'A'); | 39 | Common::set_user_cache($info, $this->model, $this->param['id'], 'A'); |
| 40 | -// } | 40 | + } |
| 41 | return $this->success($info); | 41 | return $this->success($info); |
| 42 | } | 42 | } |
| 43 | 43 |
-
请 注册 或 登录 后发表评论