作者 lyh

gx

@@ -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