正在显示
3 个修改的文件
包含
16 行增加
和
11 行删除
;w
0 → 100644
| 1 | +Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6 into develop | ||
| 2 | +# Please enter a commit message to explain why this merge is necessary, | ||
| 3 | +# especially if it merges an updated upstream into a topic branch. | ||
| 4 | +# | ||
| 5 | +# Lines starting with '#' will be ignored, and an empty message aborts | ||
| 6 | +# the commit. |
| @@ -166,21 +166,15 @@ class ATemplateController extends BaseController | @@ -166,21 +166,15 @@ class ATemplateController extends BaseController | ||
| 166 | if (empty($referer) || false == in_array($referer, ['oa.cmer.com', 'quanqiusou.cn', 'zgjoa.globalso.com'])) { | 166 | if (empty($referer) || false == in_array($referer, ['oa.cmer.com', 'quanqiusou.cn', 'zgjoa.globalso.com'])) { |
| 167 | $this->response('非法请求',Code::SYSTEM_ERROR, []); | 167 | $this->response('非法请求',Code::SYSTEM_ERROR, []); |
| 168 | } | 168 | } |
| 169 | - | ||
| 170 | - $lists = $aTemplateLogic->aTemplateList($this->map,$this->page,$this->row,$this->order); | 169 | + $filed = ['id','name','status','image','created_at']; |
| 170 | + $lists = $aTemplateLogic->aTemplateList($this->map,$this->page,$this->row,$this->order,$filed); | ||
| 171 | $data = []; | 171 | $data = []; |
| 172 | if(!empty($lists) && !empty($lists['list'])){ | 172 | if(!empty($lists) && !empty($lists['list'])){ |
| 173 | foreach ($lists['list'] as $k => $v){ | 173 | foreach ($lists['list'] as $k => $v){ |
| 174 | - $data[] = [ | ||
| 175 | - 'id' => $v['id'], | ||
| 176 | - 'name' => $v['name'], | ||
| 177 | - 'status' => $v['status'], | ||
| 178 | - 'image_link' => getImageUrl($v['image']), | ||
| 179 | - 'created_at' => $v['created_at'] | ||
| 180 | - ]; | 174 | + $v['image_link'] = getImageUrl($v['image']); |
| 175 | + $data[] = $v; | ||
| 181 | } | 176 | } |
| 182 | } | 177 | } |
| 183 | - unset($lists['list']); | ||
| 184 | $lists['data'] = $data; | 178 | $lists['data'] = $data; |
| 185 | $this->response('success',Code::SUCCESS,$lists); | 179 | $this->response('success',Code::SUCCESS,$lists); |
| 186 | } | 180 | } |
| @@ -195,14 +195,19 @@ class UserLogic extends BaseLogic | @@ -195,14 +195,19 @@ class UserLogic extends BaseLogic | ||
| 195 | //获取当前用户的觉得 | 195 | //获取当前用户的觉得 |
| 196 | $roleModel = new ProjectRole(); | 196 | $roleModel = new ProjectRole(); |
| 197 | $roleInfo = $roleModel->orderBy('id','asc')->first(); | 197 | $roleInfo = $roleModel->orderBy('id','asc')->first(); |
| 198 | + $info = $this->model->read(['role_id'=>0]); | ||
| 199 | + if(!empty($info) || !empty($roleInfo)){ | ||
| 200 | + $this->fail('系统错误,请联系管理员'); | ||
| 201 | + } | ||
| 198 | try { | 202 | try { |
| 199 | - $this->model->edit(['role_id'=>$roleInfo['id']],['role_id'=>0]); | 203 | + $this->model->edit(['role_id'=>$roleInfo['id']],['id'=>$info['id']]); |
| 200 | $this->model->edit(['role_id'=>0],['id'=>$this->param['id']]); | 204 | $this->model->edit(['role_id'=>0],['id'=>$this->param['id']]); |
| 201 | DB::commit(); | 205 | DB::commit(); |
| 202 | }catch (\Exception $e){ | 206 | }catch (\Exception $e){ |
| 203 | DB::rollBack(); | 207 | DB::rollBack(); |
| 204 | $this->fail('系统错误,请联系管理员'); | 208 | $this->fail('系统错误,请联系管理员'); |
| 205 | } | 209 | } |
| 210 | + Common::del_user_cache($this->model, [$this->param['id'],$info['id']], 'A'); | ||
| 206 | return $this->success(); | 211 | return $this->success(); |
| 207 | } | 212 | } |
| 208 | } | 213 | } |
-
请 注册 或 登录 后发表评论