作者 lyh

Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6 into master-server

... ... @@ -55,13 +55,13 @@ class UpdateRoute extends Command
*/
public function handle(){
$projectModel = new Project();
$list = $projectModel->list(['id'=>['in',[802]]]);
$list = $projectModel->list(['id'=>['in',[147]]]);
$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->setProductKeyword();
$this->getProduct();
// $this->setProductKeyword();
// $this->getBlog();
DB::disconnect('custom_mysql');
}
... ... @@ -215,7 +215,7 @@ class UpdateRoute extends Command
public function getProduct(){
$productModel = new Product();
$lists = $productModel->list(['status'=>1,'id'=>['<=',501]]);
$lists = $productModel->list(['status'=>2]);
if(!empty($lists)){
foreach ($lists as $v){
if(!empty($v['route'])){
... ... @@ -227,14 +227,15 @@ class UpdateRoute extends Command
$route = RouteMap::setRoute($route, RouteMap::SOURCE_PRODUCT, $v['id'], $v['project_id']);
$productModel->edit(['route'=>$route],['id'=>$v['id']]);
}else{
// echo date('Y-m-d H:i:s') . 'id :'.$v['id'] . PHP_EOL;
// $route = RouteMap::setRoute($v['title'], RouteMap::SOURCE_PRODUCT, $v['id'], $v['project_id']);
// $productModel->edit(['route'=>$route],['id'=>$v['id']]);
echo date('Y-m-d H:i:s') . 'id :'.$v['id'] . PHP_EOL;
$route = RouteMap::setRoute($v['title'], RouteMap::SOURCE_PRODUCT, $v['id'], $v['project_id']);
$productModel->edit(['route'=>$route],['id'=>$v['id']]);
}
continue;
}else{
echo date('Y-m-d H:i:s') . 'id :'.$v['id'] . PHP_EOL;
$v['title'] = Translate::tran($v['title'], 'en');
$v['title'] = str_replace('.','',$v['title']).'-product';
$route = RouteMap::setRoute($v['title'], RouteMap::SOURCE_PRODUCT, $v['id'], $v['project_id']);
$productModel->edit(['route'=>$route],['id'=>$v['id']]);
}
... ...
... ... @@ -31,7 +31,8 @@ class ExtensionModuleLogic extends BaseLogic
* @time :2024/8/7 15:50
*/
public function saveExtensionModule(){
ProjectServer::useProject($this->map['project_id']);
ProjectServer::useProject($this->param['project_id']);
unset($this->param['project_id']);
$this->model = new ExtensionModule();
//查看数据是否存在
if(isset($this->param['id']) && !empty($this->param['id'])){
... ... @@ -61,7 +62,8 @@ class ExtensionModuleLogic extends BaseLogic
* @time :2024/8/7 16:07
*/
public function delExtensionModule(){
ProjectServer::useProject($this->map['project_id']);
ProjectServer::useProject($this->param['project_id']);
unset($this->param['project_id']);
$moduleFiledModel = new ExtensionModuleField();
$info = $moduleFiledModel->read(['module_id'=>$this->param['id']]);
if($info !== false){
... ...
... ... @@ -478,15 +478,14 @@ class CustomTemplateLogic extends BaseLogic
//获取当前数据详情
$info = $this->model->read(['id'=>$logInfo['source_id']],['is_visualization']);
if($info['is_visualization'] == 0 || $info['is_visualization'] == 1){
//还原头部底部
$type = $this->getType();
//还原头部+底部
$commonData = [
'head_html'=>$logInfo['head_html'], 'head_css'=>$logInfo['head_css'],
'footer_html'=>$logInfo['footer_html'], 'footer_css'=>$logInfo['footer_css']
];
$commonTemplateModel = new BTemplateCommon();
$commonTemplateModel->edit($commonData,['template_id'=>$logInfo['template_id'],'type'=>$type,'project_id'=>$this->user['project_id']]);
$comTemplateModel = new BTemplateCom();
//还原头部底部
$header_type = $this->getType(BTemplate::COMMON_HEAD);
$comTemplateModel->edit(['html'=>$logInfo['other']],['template_id'=>$logInfo['template_id'],'source'=>$header_type,'project_id'=>$this->user['project_id'],'common_type'=>BTemplate::COMMON_OTHER]);
$comTemplateModel->edit(['html'=>$logInfo['head_html'], 'html_style'=>$logInfo['head_css']],['template_id'=>$logInfo['template_id'],'source'=>$header_type,'project_id'=>$this->user['project_id'],'common_type'=>BTemplate::COMMON_HEAD]);
$footer_type = $this->getType(BTemplate::COMMON_FOOTER);
$comTemplateModel->edit(['html'=>$logInfo['footer_html'], 'html_style'=>$logInfo['footer_css']],['template_id'=>$logInfo['template_id'],'source'=>$footer_type,'project_id'=>$this->user['project_id'],'common_type'=>BTemplate::COMMON_FOOTER]);
$this->model->edit(['html'=>$logInfo['main_html'],'html_style'=>$logInfo['main_css']],['id'=>$logInfo['source_id']]);
}else{
$this->model->edit(['html'=>$logInfo['text']],['id'=>$logInfo['source_id']]);
... ...