Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6
正在显示
7 个修改的文件
包含
68 行增加
和
14 行删除
| @@ -187,6 +187,7 @@ class OptimizeController extends BaseController | @@ -187,6 +187,7 @@ class OptimizeController extends BaseController | ||
| 187 | $query = $query->where('gl_project_deploy_build.test_domain','like','%'.$this->map['test_domain'].'%'); | 187 | $query = $query->where('gl_project_deploy_build.test_domain','like','%'.$this->map['test_domain'].'%'); |
| 188 | } | 188 | } |
| 189 | $query = $query->whereIn('gl_project.type',[2,4]);//TODO::2,4代表优化项目 | 189 | $query = $query->whereIn('gl_project.type',[2,4]);//TODO::2,4代表优化项目 |
| 190 | + $query = $query->whereIn('gl_project_online_check.qa_status',1); | ||
| 190 | return $query; | 191 | return $query; |
| 191 | } | 192 | } |
| 192 | 193 |
| @@ -149,19 +149,18 @@ class UserLogic extends BaseLogic | @@ -149,19 +149,18 @@ class UserLogic extends BaseLogic | ||
| 149 | { | 149 | { |
| 150 | foreach ($this->param['id'] as $id){ | 150 | foreach ($this->param['id'] as $id){ |
| 151 | $info = $this->model->read(['id'=>$id],['id','role_id']); | 151 | $info = $this->model->read(['id'=>$id],['id','role_id']); |
| 152 | - if($info['role_id'] != 0){ | ||
| 153 | - $rs = $this->model->del(['id'=>$id]); | ||
| 154 | - if($rs === false){ | ||
| 155 | - $this->fail('系统错误,请联系管理员'); | ||
| 156 | - } | ||
| 157 | - Common::del_user_cache($this->model, $id, 'A'); | ||
| 158 | - }else{ | 152 | + if($info['role_id'] == 0) { |
| 159 | //查看当前项目是否有其他的超级管理员 | 153 | //查看当前项目是否有其他的超级管理员 |
| 160 | - $roleInfo = $this->model->read(['id'=>['!=',$info['id']],'role_id'=>0]); | ||
| 161 | - if($roleInfo === false){ | ||
| 162 | - $this->fail('超级管理员不允许删除'); | 154 | + $roleInfo = $this->model->read(['id' => ['!=', $id], 'role_id' => 0]); |
| 155 | + if ($roleInfo === false) { | ||
| 156 | + $this->fail('唯一超级管理员,禁止删除'); | ||
| 163 | } | 157 | } |
| 164 | } | 158 | } |
| 159 | + $rs = $this->model->del(['id' => $id]); | ||
| 160 | + if ($rs === false) { | ||
| 161 | + $this->fail('系统错误,请联系管理员'); | ||
| 162 | + } | ||
| 163 | + Common::del_user_cache($this->model, $id, 'A'); | ||
| 165 | } | 164 | } |
| 166 | return $this->success(); | 165 | return $this->success(); |
| 167 | } | 166 | } |
| @@ -38,6 +38,7 @@ class BlogLogic extends BaseLogic | @@ -38,6 +38,7 @@ class BlogLogic extends BaseLogic | ||
| 38 | $route = $this->param['url']; | 38 | $route = $this->param['url']; |
| 39 | $this->edit($this->param,['id'=>$this->param['id']]); | 39 | $this->edit($this->param,['id'=>$this->param['id']]); |
| 40 | }else{ | 40 | }else{ |
| 41 | + $this->param['sort'] = $this->setNewsSort(); | ||
| 41 | $id = $this->model->addReturnId($this->param); | 42 | $id = $this->model->addReturnId($this->param); |
| 42 | $route = RouteMap::setRoute($this->param['url'], RouteMap::SOURCE_BLOG, $id, $this->user['project_id']); | 43 | $route = RouteMap::setRoute($this->param['url'], RouteMap::SOURCE_BLOG, $id, $this->user['project_id']); |
| 43 | $this->edit(['url'=>$route],['id'=>$id]); | 44 | $this->edit(['url'=>$route],['id'=>$id]); |
| @@ -53,6 +54,22 @@ class BlogLogic extends BaseLogic | @@ -53,6 +54,22 @@ class BlogLogic extends BaseLogic | ||
| 53 | } | 54 | } |
| 54 | 55 | ||
| 55 | /** | 56 | /** |
| 57 | + * @remark :设置最新产品的sort排序 | ||
| 58 | + * @name :setNewsSort | ||
| 59 | + * @author :lyh | ||
| 60 | + * @method :post | ||
| 61 | + * @time :2023/12/25 9:27 | ||
| 62 | + */ | ||
| 63 | + public function setNewsSort(){ | ||
| 64 | + $info = $this->model->orderBy('sort','desc')->first(); | ||
| 65 | + if(empty($info)){ | ||
| 66 | + return 1; | ||
| 67 | + } | ||
| 68 | + $sort = $info['sort']+1; | ||
| 69 | + return $sort; | ||
| 70 | + } | ||
| 71 | + | ||
| 72 | + /** | ||
| 56 | * @name :编辑seo | 73 | * @name :编辑seo |
| 57 | * @return void | 74 | * @return void |
| 58 | * @author :liyuhang | 75 | * @author :liyuhang |
| @@ -149,6 +149,7 @@ class CustomModuleContentLogic extends BaseLogic | @@ -149,6 +149,7 @@ class CustomModuleContentLogic extends BaseLogic | ||
| 149 | */ | 149 | */ |
| 150 | public function contentAdd(){ | 150 | public function contentAdd(){ |
| 151 | try { | 151 | try { |
| 152 | + $this->param['sort'] = $this->setNewsSort(); | ||
| 152 | $id = $this->model->addReturnId($this->param); | 153 | $id = $this->model->addReturnId($this->param); |
| 153 | $route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_MODULE, | 154 | $route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_MODULE, |
| 154 | $id, $this->user['project_id']); | 155 | $id, $this->user['project_id']); |
| @@ -162,6 +163,22 @@ class CustomModuleContentLogic extends BaseLogic | @@ -162,6 +163,22 @@ class CustomModuleContentLogic extends BaseLogic | ||
| 162 | } | 163 | } |
| 163 | 164 | ||
| 164 | /** | 165 | /** |
| 166 | + * @remark :设置最新产品的sort排序 | ||
| 167 | + * @name :setNewsSort | ||
| 168 | + * @author :lyh | ||
| 169 | + * @method :post | ||
| 170 | + * @time :2023/12/25 9:27 | ||
| 171 | + */ | ||
| 172 | + public function setNewsSort(){ | ||
| 173 | + $info = $this->model->orderBy('sort','desc')->first(); | ||
| 174 | + if(empty($info)){ | ||
| 175 | + return 1; | ||
| 176 | + } | ||
| 177 | + $sort = $info['sort']+1; | ||
| 178 | + return $sort; | ||
| 179 | + } | ||
| 180 | + | ||
| 181 | + /** | ||
| 165 | * @remark :编辑数据 | 182 | * @remark :编辑数据 |
| 166 | * @name :contentEdit | 183 | * @name :contentEdit |
| 167 | * @author :lyh | 184 | * @author :lyh |
| @@ -274,7 +291,7 @@ class CustomModuleContentLogic extends BaseLogic | @@ -274,7 +291,7 @@ class CustomModuleContentLogic extends BaseLogic | ||
| 274 | $v['values'] = json_encode($v['values']); | 291 | $v['values'] = json_encode($v['values']); |
| 275 | }elseif ($v['type'] == 4){ | 292 | }elseif ($v['type'] == 4){ |
| 276 | foreach ($v['values'] as $k1=>$v1){ | 293 | foreach ($v['values'] as $k1=>$v1){ |
| 277 | - $v1 = str_replace_url($v1); | 294 | + $v1['url'] = str_replace_url($v1['url']); |
| 278 | $v['values'][$k1] = $v1; | 295 | $v['values'][$k1] = $v1; |
| 279 | } | 296 | } |
| 280 | $v['values'] = json_encode($v['values']); | 297 | $v['values'] = json_encode($v['values']); |
| @@ -68,6 +68,7 @@ class NewsLogic extends BaseLogic | @@ -68,6 +68,7 @@ class NewsLogic extends BaseLogic | ||
| 68 | $route = $this->param['url']; | 68 | $route = $this->param['url']; |
| 69 | $this->edit($this->param, ['id' => $this->param['id']]); | 69 | $this->edit($this->param, ['id' => $this->param['id']]); |
| 70 | } else { | 70 | } else { |
| 71 | + $this->param['sort'] = $this->setNewsSort(); | ||
| 71 | $id = $this->model->addReturnId($this->param); | 72 | $id = $this->model->addReturnId($this->param); |
| 72 | $route = RouteMap::setRoute($this->param['url'], RouteMap::SOURCE_NEWS, $id, $this->user['project_id']); | 73 | $route = RouteMap::setRoute($this->param['url'], RouteMap::SOURCE_NEWS, $id, $this->user['project_id']); |
| 73 | $this->edit(['url' => $route], ['id' => $id]); | 74 | $this->edit(['url' => $route], ['id' => $id]); |
| @@ -84,6 +85,22 @@ class NewsLogic extends BaseLogic | @@ -84,6 +85,22 @@ class NewsLogic extends BaseLogic | ||
| 84 | } | 85 | } |
| 85 | 86 | ||
| 86 | /** | 87 | /** |
| 88 | + * @remark :设置最新产品的sort排序 | ||
| 89 | + * @name :setNewsSort | ||
| 90 | + * @author :lyh | ||
| 91 | + * @method :post | ||
| 92 | + * @time :2023/12/25 9:27 | ||
| 93 | + */ | ||
| 94 | + public function setNewsSort(){ | ||
| 95 | + $info = $this->model->orderBy('sort','desc')->first(); | ||
| 96 | + if(empty($info)){ | ||
| 97 | + return 1; | ||
| 98 | + } | ||
| 99 | + $sort = $info['sort']+1; | ||
| 100 | + return $sort; | ||
| 101 | + } | ||
| 102 | + | ||
| 103 | + /** | ||
| 87 | * @name :编辑seo | 104 | * @name :编辑seo |
| 88 | * @return void | 105 | * @return void |
| 89 | * @author :liyuhang | 106 | * @author :liyuhang |
| @@ -52,6 +52,7 @@ class ProductLogic extends BaseLogic | @@ -52,6 +52,7 @@ class ProductLogic extends BaseLogic | ||
| 52 | $id = $this->param['id']; | 52 | $id = $this->param['id']; |
| 53 | }else{ | 53 | }else{ |
| 54 | $this->param = $this->addHandleParam($this->param); | 54 | $this->param = $this->addHandleParam($this->param); |
| 55 | + $this->param['sort'] = $this->setNewsSort(); | ||
| 55 | $id = $this->model->addReturnId($this->param); | 56 | $id = $this->model->addReturnId($this->param); |
| 56 | $route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_PRODUCT, $id, $this->user['project_id']); | 57 | $route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_PRODUCT, $id, $this->user['project_id']); |
| 57 | $this->model->edit(['route'=>$route],['id'=>$id]); | 58 | $this->model->edit(['route'=>$route],['id'=>$id]); |
| @@ -77,10 +78,11 @@ class ProductLogic extends BaseLogic | @@ -77,10 +78,11 @@ class ProductLogic extends BaseLogic | ||
| 77 | */ | 78 | */ |
| 78 | public function setNewsSort(){ | 79 | public function setNewsSort(){ |
| 79 | $info = $this->model->orderBy('sort','desc')->first(); | 80 | $info = $this->model->orderBy('sort','desc')->first(); |
| 80 | - if($info === false){ | 81 | + if(empty($info)){ |
| 81 | return 1; | 82 | return 1; |
| 82 | } | 83 | } |
| 83 | - return $info['sort']++; | 84 | + $sort = $info['sort']+1; |
| 85 | + return $sort; | ||
| 84 | } | 86 | } |
| 85 | 87 | ||
| 86 | /** | 88 | /** |
| @@ -171,6 +171,7 @@ class UserLoginLogic | @@ -171,6 +171,7 @@ class UserLoginLogic | ||
| 171 | $info['image_max'] = $project['image_max']; | 171 | $info['image_max'] = $project['image_max']; |
| 172 | $info['is_update_language'] = $project['is_update_language']; | 172 | $info['is_update_language'] = $project['is_update_language']; |
| 173 | $info['configuration'] = $project['deploy_build']['configuration']; | 173 | $info['configuration'] = $project['deploy_build']['configuration']; |
| 174 | + $info['project_type'] = $project['type']; | ||
| 174 | if($info['is_customized'] == 1){ | 175 | if($info['is_customized'] == 1){ |
| 175 | $info['is_visualization'] = json_decode($project['is_visualization']); | 176 | $info['is_visualization'] = json_decode($project['is_visualization']); |
| 176 | } | 177 | } |
| @@ -207,7 +208,7 @@ class UserLoginLogic | @@ -207,7 +208,7 @@ class UserLoginLogic | ||
| 207 | $info['image_max'] = $project['image_max']; | 208 | $info['image_max'] = $project['image_max']; |
| 208 | $info['is_update_language'] = $project['is_update_language']; | 209 | $info['is_update_language'] = $project['is_update_language']; |
| 209 | $info['configuration'] = $project['deploy_build']['configuration']; | 210 | $info['configuration'] = $project['deploy_build']['configuration']; |
| 210 | - $info['type'] = $project['type']; | 211 | + $info['project_type'] = $project['type']; |
| 211 | if($info['is_customized'] == 1){ | 212 | if($info['is_customized'] == 1){ |
| 212 | $info['is_visualization'] = json_decode($project['is_visualization']); | 213 | $info['is_visualization'] = json_decode($project['is_visualization']); |
| 213 | } | 214 | } |
-
请 注册 或 登录 后发表评论