作者 lyh

gx

... ... @@ -63,7 +63,7 @@ class UpdateRoute extends Command
foreach ($list as $v){
echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL;
ProjectServer::useProject($v['id']);
$this->getProduct();
$this->setProductKeyword();
DB::disconnect('custom_mysql');
}
echo date('Y-m-d H:i:s') . 'end' . PHP_EOL;
... ... @@ -275,16 +275,16 @@ class UpdateRoute extends Command
$lists = $keywordModel->list(['status'=>1,'route'=>'']);
if(!empty($lists)){
foreach ($lists as $v){
$tag = "-tag";
if (!(substr($v['route'], -strlen($tag)) === $tag)) {
echo date('Y-m-d H:i:s') . '拼接'.$tag . PHP_EOL;
$route = $v['route'].$tag;
// $tag = "-tag";
// if (!(substr($v['route'], -strlen($tag)) === $tag)) {
// echo date('Y-m-d H:i:s') . '拼接'.$tag . PHP_EOL;
$route = $v['title'];
// 如果不是以 '-tag' 结尾,则拼接上 '-tag'
$routeModel = new RouteMap();
$routeModel->edit(['route'=>$route],['source'=>RouteMap::SOURCE_PRODUCT_KEYWORD,'source_id'=>$v['id']]);
$keywordModel->edit(['route'=>$route],['id'=>$v['id']]);
echo date('Y-m-d H:i:s') . 'end'.$v['id'] . PHP_EOL;
}
// }
}
}
}
... ...
... ... @@ -96,7 +96,7 @@ class KeywordController extends BaseController
* @method :post
* @time :2023/8/23 16:57
*/
public function info(Request $request, KeywordLogic $logic){
public function info(KeywordLogic $logic){
$data = $logic->getKeywordInfo();
if($data !== false){
$data = $this->handleReturnInfo($data);
... ...