合并分支 'akun' 到 'master'
Akun 查看合并请求 !536
正在显示
1 个修改的文件
包含
19 行增加
和
1 行删除
| @@ -90,7 +90,7 @@ class UpdateController extends BaseController | @@ -90,7 +90,7 @@ class UpdateController extends BaseController | ||
| 90 | $template_info = $bSettingModel->read(['project_id' => $this->param['project_id']]); | 90 | $template_info = $bSettingModel->read(['project_id' => $this->param['project_id']]); |
| 91 | $template_id = $template_info ? $template_info['template_id'] : 0;//获取模版id | 91 | $template_id = $template_info ? $template_info['template_id'] : 0;//获取模版id |
| 92 | foreach ($category_list as $category) { | 92 | foreach ($category_list as $category) { |
| 93 | - if ($this->getIsRenovation(BTemplate::SOURCE_PRODUCT, BTemplate::IS_LIST, $template_id, $category['id']) == 1) { | 93 | + if ($this->getRenovation($this->param['project_id'], BTemplate::SOURCE_PRODUCT, BTemplate::IS_LIST, $template_id, $category['id']) == 1) { |
| 94 | //有分类开启了可视化 | 94 | //有分类开启了可视化 |
| 95 | $this->param['type'] = 0; | 95 | $this->param['type'] = 0; |
| 96 | break; | 96 | break; |
| @@ -198,4 +198,22 @@ class UpdateController extends BaseController | @@ -198,4 +198,22 @@ class UpdateController extends BaseController | ||
| 198 | 198 | ||
| 199 | $this->response('采集任务添加成功'); | 199 | $this->response('采集任务添加成功'); |
| 200 | } | 200 | } |
| 201 | + | ||
| 202 | + public function getRenovation($project_id,$source, $is_list, $template_id, $id, $is_custom = 0) | ||
| 203 | + { | ||
| 204 | + $webTemplateModel = new BTemplate(); | ||
| 205 | + $param = [ | ||
| 206 | + 'source' => $source, | ||
| 207 | + 'project_id' => $project_id, | ||
| 208 | + 'source_id' => $id, | ||
| 209 | + 'template_id' => $template_id, | ||
| 210 | + 'is_list' => $is_list, | ||
| 211 | + 'is_custom' => $is_custom | ||
| 212 | + ]; | ||
| 213 | + $templateInfo = $webTemplateModel->read($param); | ||
| 214 | + if ($templateInfo !== false) { | ||
| 215 | + return 1; | ||
| 216 | + } | ||
| 217 | + return 0; | ||
| 218 | + } | ||
| 201 | } | 219 | } |
-
请 注册 或 登录 后发表评论