Merge remote-tracking branch 'origin/master' into akun
正在显示
3 个修改的文件
包含
21 行增加
和
11 行删除
| @@ -177,10 +177,11 @@ class UpdateSeoTdk extends Command | @@ -177,10 +177,11 @@ class UpdateSeoTdk extends Command | ||
| 177 | if(!Redis::setnx($cache_key, 1)){ | 177 | if(!Redis::setnx($cache_key, 1)){ |
| 178 | continue; | 178 | continue; |
| 179 | } | 179 | } |
| 180 | - Redis::expire($cache_key, 120); | 180 | + Redis::expire($cache_key, 300); |
| 181 | 181 | ||
| 182 | echo date('Y-m-d H:i:s') . '更新--' . $table . ': 项目id' . $project_id . ':id' . $v['id'] . PHP_EOL; | 182 | echo date('Y-m-d H:i:s') . '更新--' . $table . ': 项目id' . $project_id . ':id' . $v['id'] . PHP_EOL; |
| 183 | - | 183 | + $v = DB::connection('custom_mysql')->table($table)->where('id', $v['id'])->first(); |
| 184 | + $v = (array)$v; | ||
| 184 | $data = []; | 185 | $data = []; |
| 185 | $json_field = ''; | 186 | $json_field = ''; |
| 186 | foreach ($map as $ai_key => $field) { | 187 | foreach ($map as $ai_key => $field) { |
| @@ -13,6 +13,7 @@ use App\Enums\Common\Code; | @@ -13,6 +13,7 @@ use App\Enums\Common\Code; | ||
| 13 | use App\Http\Controllers\Aside\BaseController; | 13 | use App\Http\Controllers\Aside\BaseController; |
| 14 | use App\Models\ASide\APublicModel; | 14 | use App\Models\ASide\APublicModel; |
| 15 | use App\Models\Channel\Channel; | 15 | use App\Models\Channel\Channel; |
| 16 | +use App\Models\Domain\DomainInfo; | ||
| 16 | use App\Models\Manage\Manage; | 17 | use App\Models\Manage\Manage; |
| 17 | use App\Models\Project\OnlineCheck; | 18 | use App\Models\Project\OnlineCheck; |
| 18 | use App\Models\Project\Project; | 19 | use App\Models\Project\Project; |
| @@ -127,9 +128,14 @@ class OnlineController extends BaseController | @@ -127,9 +128,14 @@ class OnlineController extends BaseController | ||
| 127 | * @time :2023/8/18 10:58 | 128 | * @time :2023/8/18 10:58 |
| 128 | */ | 129 | */ |
| 129 | public function searchParam(&$query){ | 130 | public function searchParam(&$query){ |
| 130 | - //搜索条件处理 | ||
| 131 | - if(isset($this->map['title'])){ | ||
| 132 | - $query = $query->where('gl_project.title','like','%'.$this->map['title'].'%'); | 131 | + if(!empty($this->map['search']) && !empty($this->map['search_type'])){ |
| 132 | + // 搜索域名 | ||
| 133 | + if($this->map['search_type'] == 'test_domain'){ | ||
| 134 | + $query->where('gl_project_deploy_build.test_domain','like','%'.$this->map['search'].'%'); | ||
| 135 | + } else { | ||
| 136 | + // 搜索名称 | ||
| 137 | + $query->where('gl_project.title', 'like', '%' . $this->map['search'] . '%'); | ||
| 138 | + } | ||
| 133 | } | 139 | } |
| 134 | $query = $query->where('gl_project.status',1);//TODO::已提交审核 | 140 | $query = $query->where('gl_project.status',1);//TODO::已提交审核 |
| 135 | return $query; | 141 | return $query; |
| @@ -24,6 +24,10 @@ class WebSettingImageController extends BaseController | @@ -24,6 +24,10 @@ class WebSettingImageController extends BaseController | ||
| 24 | */ | 24 | */ |
| 25 | public function lists(WebSettingImage $webSettingImage){ | 25 | public function lists(WebSettingImage $webSettingImage){ |
| 26 | $list = $webSettingImage->list([],'id',['id','image','type']); | 26 | $list = $webSettingImage->list([],'id',['id','image','type']); |
| 27 | + foreach ($list as $k=>$v){ | ||
| 28 | + $v['image'] = getImageUrl($v['image']); | ||
| 29 | + $list[$k] = $v; | ||
| 30 | + } | ||
| 27 | $this->response('success',Code::SUCCESS,$list); | 31 | $this->response('success',Code::SUCCESS,$list); |
| 28 | } | 32 | } |
| 29 | 33 | ||
| @@ -35,17 +39,16 @@ class WebSettingImageController extends BaseController | @@ -35,17 +39,16 @@ class WebSettingImageController extends BaseController | ||
| 35 | * @time :2023/9/21 15:17 | 39 | * @time :2023/9/21 15:17 |
| 36 | */ | 40 | */ |
| 37 | public function save(WebSettingImage $webSettingImage){ | 41 | public function save(WebSettingImage $webSettingImage){ |
| 42 | + try { | ||
| 43 | + $webSettingImage->del(['project_id'=>$this->user['project_id']]); | ||
| 38 | foreach ($this->param['data'] as $v){ | 44 | foreach ($this->param['data'] as $v){ |
| 39 | - if(isset($v['id']) && !empty($v['id'])){ | ||
| 40 | - $rs = $webSettingImage->edit($v,['id'=>$v['id']]); | ||
| 41 | - }else{ | ||
| 42 | $v['project_id'] = $this->user['project_id']; | 45 | $v['project_id'] = $this->user['project_id']; |
| 43 | - $rs = $webSettingImage->add($v); | 46 | + $v['image'] = str_replace_url($v['image']); |
| 47 | + $webSettingImage->add($v); | ||
| 44 | } | 48 | } |
| 45 | - if($rs === false){ | 49 | + }catch (\Exception $e){ |
| 46 | $this->response('系统错误请联系管理员'); | 50 | $this->response('系统错误请联系管理员'); |
| 47 | } | 51 | } |
| 48 | - } | ||
| 49 | $this->response('success'); | 52 | $this->response('success'); |
| 50 | } | 53 | } |
| 51 | } | 54 | } |
-
请 注册 或 登录 后发表评论