正在显示
2 个修改的文件
包含
36 行增加
和
7 行删除
| @@ -8,6 +8,7 @@ use App\Exceptions\AsideGlobalException; | @@ -8,6 +8,7 @@ use App\Exceptions\AsideGlobalException; | ||
| 8 | use App\Models\Com\NoticeLog; | 8 | use App\Models\Com\NoticeLog; |
| 9 | use App\Models\Com\UpdateLog; | 9 | use App\Models\Com\UpdateLog; |
| 10 | use App\Models\Devops\ServerConfig; | 10 | use App\Models\Devops\ServerConfig; |
| 11 | +use App\Models\Project\InquiryFilterConfig; | ||
| 11 | use App\Models\Project\ProjectRenew; | 12 | use App\Models\Project\ProjectRenew; |
| 12 | use App\Models\Template\Setting; | 13 | use App\Models\Template\Setting; |
| 13 | use App\Models\User\ProjectMenu; | 14 | use App\Models\User\ProjectMenu; |
| @@ -146,9 +147,8 @@ class ProjectLogic extends BaseLogic | @@ -146,9 +147,8 @@ class ProjectLogic extends BaseLogic | ||
| 146 | //保存售后信息 | 147 | //保存售后信息 |
| 147 | $this->saveProjectAfter($this->param['project_after']); | 148 | $this->saveProjectAfter($this->param['project_after']); |
| 148 | //保存询盘过滤配置 | 149 | //保存询盘过滤配置 |
| 149 | - if(!empty($this->param['inquiry_filter_config'])){ | ||
| 150 | - $this->saveInquiryFilterConfig($this->param['inquiry_filter_config']); | ||
| 151 | - } | 150 | + $this->param['inquiry_filter_config']['project_id'] = $this->param['id']; |
| 151 | + $this->saveInquiryFilterConfig($this->param['inquiry_filter_config']); | ||
| 152 | 152 | ||
| 153 | //创建站点 | 153 | //创建站点 |
| 154 | // $this->createSite($this->param); | 154 | // $this->createSite($this->param); |
| @@ -198,7 +198,7 @@ class ProjectLogic extends BaseLogic | @@ -198,7 +198,7 @@ class ProjectLogic extends BaseLogic | ||
| 198 | } | 198 | } |
| 199 | $param['remain_day'] = $param['deploy_build']['service_duration'] - $param['finish_remain_day']; | 199 | $param['remain_day'] = $param['deploy_build']['service_duration'] - $param['finish_remain_day']; |
| 200 | $param['remain_day'] = ($param['remain_day'] > 0) ? $param['remain_day'] : 0; | 200 | $param['remain_day'] = ($param['remain_day'] > 0) ? $param['remain_day'] : 0; |
| 201 | - unset($param['payment'],$param['deploy_build'],$param['deploy_optimize'],$param['online_check'],$param['project_after']); | 201 | + unset($param['payment'],$param['deploy_build'],$param['deploy_optimize'],$param['online_check'],$param['project_after'],$param['inquiry_filter_config']); |
| 202 | //文件上传默认值 | 202 | //文件上传默认值 |
| 203 | if($param['is_upload_manage']){ | 203 | if($param['is_upload_manage']){ |
| 204 | $param['upload_config'] = [ | 204 | $param['upload_config'] = [ |
| @@ -322,9 +322,18 @@ class ProjectLogic extends BaseLogic | @@ -322,9 +322,18 @@ class ProjectLogic extends BaseLogic | ||
| 322 | * @date 2024/1/19 | 322 | * @date 2024/1/19 |
| 323 | */ | 323 | */ |
| 324 | protected function saveInquiryFilterConfig($config){ | 324 | protected function saveInquiryFilterConfig($config){ |
| 325 | - //查询数据是否存在 | ||
| 326 | - $afterModel = new After(); | ||
| 327 | - $afterModel->edit($project_after,['id'=>$project_after['id']]); | 325 | + $model = new InquiryFilterConfig(); |
| 326 | + $config['filter_countries'] = Arr::a2s(!empty($config['filter_countries']) ? $config['filter_countries'] : []); | ||
| 327 | + $config['filter_contents'] = Arr::a2s(!empty($config['filter_contents']) ? $config['filter_contents'] : []); | ||
| 328 | + $config['filter_referers'] = Arr::a2s(!empty($config['filter_referers']) ? $config['filter_referers'] : []); | ||
| 329 | + $config['filter_emails'] = Arr::a2s(!empty($config['filter_emails']) ? $config['filter_emails'] : []); | ||
| 330 | + $config['filter_mobiles'] = Arr::a2s(!empty($config['filter_mobiles']) ? $config['filter_mobiles'] : []); | ||
| 331 | + $config['filter_names'] = Arr::a2s(!empty($config['filter_names']) ? $config['filter_names'] : []); | ||
| 332 | + if(empty($config['id'])){ | ||
| 333 | + $model->add($config); | ||
| 334 | + }else{ | ||
| 335 | + $model->edit($config,['id'=>$config['id']]); | ||
| 336 | + } | ||
| 328 | return $this->success(); | 337 | return $this->success(); |
| 329 | } | 338 | } |
| 330 | 339 |
app/Models/Project/InquiryFilterConfig.php
0 → 100644
| 1 | +<?php | ||
| 2 | + | ||
| 3 | +namespace App\Models\Project; | ||
| 4 | + | ||
| 5 | +use App\Models\Base; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * 询盘过滤配置 | ||
| 9 | + * Class InquiryFilterConfig | ||
| 10 | + * @package App\Models\Project | ||
| 11 | + * @author zbj | ||
| 12 | + * @date 2024/1/19 | ||
| 13 | + */ | ||
| 14 | +class InquiryFilterConfig extends Base | ||
| 15 | +{ | ||
| 16 | + //设置关联表名 | ||
| 17 | + protected $table = 'gl_project_inquiry_filter_config'; | ||
| 18 | + | ||
| 19 | + | ||
| 20 | +} |
-
请 注册 或 登录 后发表评论