作者 lyh

gx

@@ -56,6 +56,7 @@ class UpdateKeyword extends Command @@ -56,6 +56,7 @@ class UpdateKeyword extends Command
56 DB::disconnect('custom_mysql'); 56 DB::disconnect('custom_mysql');
57 } 57 }
58 echo date('Y-m-d H:i:s') . 'end' . PHP_EOL; 58 echo date('Y-m-d H:i:s') . 'end' . PHP_EOL;
  59 + return true;
59 } 60 }
60 61
61 62
@@ -83,4 +84,24 @@ class UpdateKeyword extends Command @@ -83,4 +84,24 @@ class UpdateKeyword extends Command
83 } 84 }
84 return true; 85 return true;
85 } 86 }
  87 +
  88 + /**
  89 + * @remark :查看关键词的列表
  90 + * @name :getRouteKeywordList
  91 + * @author :lyh
  92 + * @method :post
  93 + * @time :2024/3/25 16:53
  94 + */
  95 + public function getRouteKeywordList(){
  96 + $keywordModel = new Keyword();
  97 + $lists = $keywordModel->list(['is_upgrade'=>0,'source'=>'product_keyword']);
  98 + foreach ($lists as $k => $values){
  99 + $routeModel = new RouteMap();
  100 + $info = $routeModel->read(['route'=>$values['route']]);
  101 + if($info === false){
  102 + $keywordModel->del(['id'=>$values['id']]);
  103 + }
  104 + }
  105 + return true;
  106 + }
86 } 107 }