作者 lyh

gxxiaoxie

... ... @@ -56,12 +56,12 @@ class UpdateRoute extends Command
*/
public function handle(){
$projectModel = new Project();
$list = $projectModel->list(['id'=>['in',[1417]]]);
$list = $projectModel->list(['id'=>['in',[1750]]]);
$data = [];
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->getProduct();
// $this->setProductKeyword();
// $this->getBlog();
// $this->setCustomRoute($v['id']);
... ... @@ -71,6 +71,40 @@ class UpdateRoute extends Command
echo date('Y-m-d H:i:s') . 'end' . PHP_EOL;
}
/**
* @remark :同步擴展模塊數據到blogs
* @name :custom_to_blogs
* @author :lyh
* @method :post
* @time :2024/10/28 15:45
*/
public function custom_to_blogs(){
$customContentModel = new CustomModuleContent();
$lists = $customContentModel->list(['module_id'=>9]);
foreach ($lists as $k => $v){
$data = [
'name'=>$v['name'],
'category_id'=>',1,',
'remark'=>$v['remark'],
'text'=>$v['content'],
'url'=>$v['route'],
'image'=>$v['image'],
'seo_title'=>$v['seo_title'],
'seo_description'=>$v['seo_description'],
'seo_keywords'=>$v['seo_keywords'],
'project_id'=>1750,
'operator_id'=>$v['operator_id'],
'create_id'=>$v['operator_id'],
'created_at'=>$v['created_at'],
'updated_at'=>$v['updated_at'],
'release_at'=>$v['release_at']
];
$blogModel = new Blog();
$id = $blogModel->insertGetId($data);
$route = RouteMap::setRoute($v['route'], RouteMap::SOURCE_MODULE, $id, 1750);
}
}
public function editProductAlt(){
$productModel = new Product();
$lists = $productModel->list(['status'=>1],'id',['id','route','thumb','gallery']);
... ...
... ... @@ -145,7 +145,7 @@ class KeywordLogic extends BaseLogic
$keywordModel = new Keyword();
$firstNumWord = $keywordModel->firstNumWord;
foreach($firstNumWord as $k => $v){
if($v == $first_title){
if(strtolower($v) == strtolower($first_title)){
return $k;
}
}
... ...