Merge remote-tracking branch 'origin/master' into akun
正在显示
7 个修改的文件
包含
20 行增加
和
26 行删除
| @@ -108,18 +108,4 @@ class UpdateKeyword extends Command | @@ -108,18 +108,4 @@ class UpdateKeyword extends Command | ||
| 108 | return true; | 108 | return true; |
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | - /** | ||
| 112 | - * @remark :更新产品关键词 | ||
| 113 | - * @name :updatedProductKeyword | ||
| 114 | - * @author :lyh | ||
| 115 | - * @method :post | ||
| 116 | - * @time :2024/11/27 14:26 | ||
| 117 | - */ | ||
| 118 | - public function updatedProductKeyword(){ | ||
| 119 | - $productModel = new Product(); | ||
| 120 | - $lists = $productModel->list(); | ||
| 121 | - foreach ($lists as $k => $v){ | ||
| 122 | - | ||
| 123 | - } | ||
| 124 | - } | ||
| 125 | } | 111 | } |
| @@ -8,6 +8,7 @@ use App\Http\Logic\Bside\Product\KeywordLogic; | @@ -8,6 +8,7 @@ use App\Http\Logic\Bside\Product\KeywordLogic; | ||
| 8 | use App\Http\Requests\Bside\Product\KeywordRequest; | 8 | use App\Http\Requests\Bside\Product\KeywordRequest; |
| 9 | use App\Models\Product\Keyword; | 9 | use App\Models\Product\Keyword; |
| 10 | use App\Models\Product\KeywordPage; | 10 | use App\Models\Product\KeywordPage; |
| 11 | +use App\Models\Product\KeywordRelated; | ||
| 11 | use App\Models\Product\Product; | 12 | use App\Models\Product\Product; |
| 12 | use App\Rules\Ids; | 13 | use App\Rules\Ids; |
| 13 | use Illuminate\Http\Request; | 14 | use Illuminate\Http\Request; |
| @@ -35,7 +36,7 @@ class KeywordController extends BaseController | @@ -35,7 +36,7 @@ class KeywordController extends BaseController | ||
| 35 | $data = $keyword->lists($this->map,$this->page,$this->row,$this->order,$filed); | 36 | $data = $keyword->lists($this->map,$this->page,$this->row,$this->order,$filed); |
| 36 | if(!empty($data)){ | 37 | if(!empty($data)){ |
| 37 | foreach ($data['list'] as &$v){ | 38 | foreach ($data['list'] as &$v){ |
| 38 | - $v['product_num'] = Product::where('keyword_id','like' ,'%,'.$v['id'].',%')->count(); | 39 | + $v['product_num'] = KeywordRelated::where('keyword_id',$v['id'])->count(); |
| 39 | if(!empty($v['seo_title']) || !empty($v['seo_keywords']) || !empty($v['seo_description'])){ | 40 | if(!empty($v['seo_title']) || !empty($v['seo_keywords']) || !empty($v['seo_description'])){ |
| 40 | $v['tdk'] = 1; | 41 | $v['tdk'] = 1; |
| 41 | }else{ | 42 | }else{ |
| @@ -43,7 +43,7 @@ class InquiryLogic extends BaseLogic | @@ -43,7 +43,7 @@ class InquiryLogic extends BaseLogic | ||
| 43 | $ids = $this->request['ids'] ?: []; | 43 | $ids = $this->request['ids'] ?: []; |
| 44 | $project = (new ProjectLogic())->getProjectInfo($this->user['project_id']); | 44 | $project = (new ProjectLogic())->getProjectInfo($this->user['project_id']); |
| 45 | $domain = (!empty( | 45 | $domain = (!empty( |
| 46 | - $project['deploy_optimize']['domain']) ? ((new DomainInfo())->getDomain($project['deploy_optimize']['domain'])) : ''); | 46 | + $project['deploy_optimize']['domain']) ? ((new DomainInfo())->getDomain($project['deploy_optimize']['domain'])) : $project['deploy_build']['test_domain']); |
| 47 | $list = $this->form_globalso_api->getInquiryList($domain, $search, $page, $page_size, $ids); | 47 | $list = $this->form_globalso_api->getInquiryList($domain, $search, $page, $page_size, $ids); |
| 48 | //处理格式 免得前端又改 | 48 | //处理格式 免得前端又改 |
| 49 | $data = [ | 49 | $data = [ |
| @@ -208,8 +208,11 @@ class ProductLogic extends BaseLogic | @@ -208,8 +208,11 @@ class ProductLogic extends BaseLogic | ||
| 208 | public function editList(){ | 208 | public function editList(){ |
| 209 | $category_ids = $this->param['category_id']; | 209 | $category_ids = $this->param['category_id']; |
| 210 | $this->param['category_id'] = $this->handleListCategory($this->param['category_id']); | 210 | $this->param['category_id'] = $this->handleListCategory($this->param['category_id']); |
| 211 | - $keyword_arr = $this->param['keyword_id']; | ||
| 212 | - $this->param['keyword_id'] = $this->saveKeyword($this->param['keyword_id']); | 211 | + $keyword_arr = $this->saveKeyword($this->param['keyword_id']); |
| 212 | + $this->param['keyword_id'] = ''; | ||
| 213 | + if(!empty($keyword_arr)){ | ||
| 214 | + $this->param['keyword_id'] = ','.implode(',',$keyword_arr).','; | ||
| 215 | + } | ||
| 213 | if(isset($this->param['gallery']) && !empty($this->param['gallery'])){ | 216 | if(isset($this->param['gallery']) && !empty($this->param['gallery'])){ |
| 214 | foreach ($this->param['gallery'] as $k => $v){ | 217 | foreach ($this->param['gallery'] as $k => $v){ |
| 215 | $v['url'] = str_replace_url($v['url']); | 218 | $v['url'] = str_replace_url($v['url']); |
| @@ -242,7 +245,7 @@ class ProductLogic extends BaseLogic | @@ -242,7 +245,7 @@ class ProductLogic extends BaseLogic | ||
| 242 | * @time :2023/10/26 9:51 | 245 | * @time :2023/10/26 9:51 |
| 243 | */ | 246 | */ |
| 244 | public function saveKeyword($keyword){ | 247 | public function saveKeyword($keyword){ |
| 245 | - $str = ''; | 248 | + $arr = []; |
| 246 | if(isset($keyword) && !empty($keyword)){ | 249 | if(isset($keyword) && !empty($keyword)){ |
| 247 | $arr = []; | 250 | $arr = []; |
| 248 | $keywordModel = new Keyword(); | 251 | $keywordModel = new Keyword(); |
| @@ -267,9 +270,8 @@ class ProductLogic extends BaseLogic | @@ -267,9 +270,8 @@ class ProductLogic extends BaseLogic | ||
| 267 | $arr[] = $info['id']; | 270 | $arr[] = $info['id']; |
| 268 | } | 271 | } |
| 269 | } | 272 | } |
| 270 | - $str = ','.implode(',',$arr).','; | ||
| 271 | } | 273 | } |
| 272 | - return $str; | 274 | + return $arr; |
| 273 | } | 275 | } |
| 274 | 276 | ||
| 275 | /** | 277 | /** |
| @@ -569,7 +569,7 @@ class RankDataLogic extends BaseLogic | @@ -569,7 +569,7 @@ class RankDataLogic extends BaseLogic | ||
| 569 | if(in_array($project_id, array_keys($multiple_api_no_project_ids))){ | 569 | if(in_array($project_id, array_keys($multiple_api_no_project_ids))){ |
| 570 | $api_nos = array_keys($multiple_api_no_project_ids[$project_id]); | 570 | $api_nos = array_keys($multiple_api_no_project_ids[$project_id]); |
| 571 | //今天其他api_no是否都达标了 | 571 | //今天其他api_no是否都达标了 |
| 572 | - $count = RankData::where('project_id', $project_id)->whereIn('api_no', $api_nos)->where('api_no', '<>', $api_no)->where('date', date('Y-m-d')) | 572 | + $count = RankData::where('project_id', $project_id)->whereIn('api_no', $api_nos)->where('api_no', '<>', $api_no)->where('updated_date', date('Y-m-d')) |
| 573 | ->where('is_compliance', 1)->count(); | 573 | ->where('is_compliance', 1)->count(); |
| 574 | if($count == count($api_nos) - 1){ | 574 | if($count == count($api_nos) - 1){ |
| 575 | Project::where('id', $project_id)->update(['is_remain_today' => 1, 'finish_remain_day' => $compliance_day + 1]); | 575 | Project::where('id', $project_id)->update(['is_remain_today' => 1, 'finish_remain_day' => $compliance_day + 1]); |
| @@ -34,10 +34,12 @@ class SyncService | @@ -34,10 +34,12 @@ class SyncService | ||
| 34 | $project = Project::with('deploy_build')->with('deploy_optimize')->where(['id'=>$project_id])->first(); | 34 | $project = Project::with('deploy_build')->with('deploy_optimize')->where(['id'=>$project_id])->first(); |
| 35 | // 不满足条件 不同步到表单系统 | 35 | // 不满足条件 不同步到表单系统 |
| 36 | if (empty($project->deploy_optimize->domain)) { | 36 | if (empty($project->deploy_optimize->domain)) { |
| 37 | - return false; | 37 | + $domain = ''; |
| 38 | + }else{ | ||
| 39 | + // 生产域名 | ||
| 40 | + $domain = (new DomainInfo())->getDomain($project->deploy_optimize->domain); | ||
| 38 | } | 41 | } |
| 39 | - // 生产域名 | ||
| 40 | - $domain = (new DomainInfo())->getDomain($project->deploy_optimize->domain); | 42 | + |
| 41 | // 收件设置信息 | 43 | // 收件设置信息 |
| 42 | ProjectServer::useProject($project_id); | 44 | ProjectServer::useProject($project_id); |
| 43 | $receive = WebSettingReceiving::where(['project_id' => $project_id])->get(); | 45 | $receive = WebSettingReceiving::where(['project_id' => $project_id])->get(); |
| @@ -114,7 +114,10 @@ class SyncSubmitTaskService | @@ -114,7 +114,10 @@ class SyncSubmitTaskService | ||
| 114 | public function subscribe($data, $date, $task_id){ | 114 | public function subscribe($data, $date, $task_id){ |
| 115 | $email = $data['data']['email']; | 115 | $email = $data['data']['email']; |
| 116 | if (filter_var($email, FILTER_VALIDATE_EMAIL)) { | 116 | if (filter_var($email, FILTER_VALIDATE_EMAIL)) { |
| 117 | - $model = new Email(); | 117 | + $model = Email::where('email', $email)->first(); |
| 118 | + if($model){ | ||
| 119 | + return true; | ||
| 120 | + } | ||
| 118 | $model->email = $email; | 121 | $model->email = $email; |
| 119 | $model->save(); | 122 | $model->save(); |
| 120 | }else{ | 123 | }else{ |
-
请 注册 或 登录 后发表评论