合并分支 'lyh-server' 到 'master'
Lyh server 查看合并请求 !2224
正在显示
1 个修改的文件
包含
2 行增加
和
20 行删除
| @@ -41,27 +41,9 @@ class lyhDemo extends Command | @@ -41,27 +41,9 @@ class lyhDemo extends Command | ||
| 41 | protected $description = '更新路由'; | 41 | protected $description = '更新路由'; |
| 42 | 42 | ||
| 43 | public function handle(){ | 43 | public function handle(){ |
| 44 | - self::initAggregateKeywordAffix(); | ||
| 45 | - return true; | 44 | + return $this->aggregate_keyword_affix(); |
| 46 | } | 45 | } |
| 47 | 46 | ||
| 48 | - public static function initAggregateKeywordAffix($project_id = 4298){ | ||
| 49 | - $time = date('Y-m-d H:i:s'); | ||
| 50 | - $prefix = "How To find"."\n"."Why Choose"."\n"."China Top"."\n"."Best Way To Choose"."\n"."Methods To Choose"; | ||
| 51 | - $suffix = "Manufacturer"."\n"."Supplier"."\n"."Products"."\n"."Factory"; | ||
| 52 | - $info = DB::table('gl_aggregate_keyword_affix')->where('project_id',$project_id)->first(); | ||
| 53 | - if(empty($info)){ | ||
| 54 | - $data = [ | ||
| 55 | - 'project_id'=>$project_id, | ||
| 56 | - 'prefix'=>$prefix, | ||
| 57 | - 'suffix'=>$suffix, | ||
| 58 | - 'created_at' => $time, | ||
| 59 | - 'updated_at' => $time | ||
| 60 | - ]; | ||
| 61 | - DB::table('gl_aggregate_keyword_affix')->insert($data); | ||
| 62 | - } | ||
| 63 | - return true; | ||
| 64 | - } | ||
| 65 | /** | 47 | /** |
| 66 | * @remark :获取数据 | 48 | * @remark :获取数据 |
| 67 | * @name :aggregate_keyword_affix | 49 | * @name :aggregate_keyword_affix |
| @@ -71,7 +53,7 @@ class lyhDemo extends Command | @@ -71,7 +53,7 @@ class lyhDemo extends Command | ||
| 71 | */ | 53 | */ |
| 72 | public function aggregate_keyword_affix(){ | 54 | public function aggregate_keyword_affix(){ |
| 73 | $projectModel = new Project(); | 55 | $projectModel = new Project(); |
| 74 | - $lists = $projectModel->list(['delete_status' => 0,'project_type'=>0,'extend_type'=>0,'type'=>['in',[2,4]]], 'id', ['id']); | 56 | + $lists = $projectModel->list(['delete_status' => 0,'project_type'=>0,'extend_type'=>0,'type'=>['in',[1,2,4]]], 'id', ['id']); |
| 75 | $keywordAffixModel = new AggregateKeywordAffix(); | 57 | $keywordAffixModel = new AggregateKeywordAffix(); |
| 76 | foreach ($lists as $val){ | 58 | foreach ($lists as $val){ |
| 77 | $info = $keywordAffixModel->read(['project_id'=>$val['id']]); | 59 | $info = $keywordAffixModel->read(['project_id'=>$val['id']]); |
-
请 注册 或 登录 后发表评论