作者 lyh

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

... ... @@ -55,7 +55,7 @@ class RemainDay extends Command
{
$list = Project::whereIn('type', [2,3,4])->get();
foreach ($list as $item){
if($item['type'] == 3){
if($item['type'] == Project::TYPE_TWO){
//排名达标天数
$compliance_day = GoogleRankModel::where(['project_id' => $item['id'], 'lang' => ''])->value('compliance_day') ?: 0;
$remain_day = $item['deploy_build']['service_duration'] - $compliance_day;
... ...
... ... @@ -619,6 +619,7 @@ class ProjectController extends BaseController
$domain_array = parse_url($domain_pro ? $domain_pro->domain : '');
$domain = $domain_array['host'] ?? $domain_array['path'];
}
$manage = new Manage();
$param = [
"id" => $item['id'],
"title" => $item['title'],
... ... @@ -639,8 +640,11 @@ class ProjectController extends BaseController
"test_domain" => $item['deploy_build']['test_domain'] ?? '',
"online_time" => $item['online_check']['qa_check_time'] ?? '',
"cooperate_date" => $item['cooperate_date'],
"project_manager_name" => $manage->getName($item['deploy_build']['manager_mid']), //项目经理
"after_sales_manager_name" => $manage->getName($item['deploy_optimize']['manager_mid']), //售后服务经理
"leader_name" => $manage->getName($item['deploy_build']['leader_mid']), //组长
];
if ($item['type'] == 3) {
if ($item['type'] == Project::TYPE_TWO) {
$param['is_compliance'] = RankData::where('project_id', $item['id'])->where('lang', '')->value('is_compliance') ?: 0;
} else {
$param['is_compliance'] = 1;
... ...
... ... @@ -90,7 +90,7 @@ class CustomTemplateLogic extends BaseLogic
public function saveHtml(){
$html = $this->param['html'];
$this->saveCommonTemplate($html);
$this->param['html'] = characterTruncation($html,'/<main>(.*?)<\/main>/s');
$this->param['html'] = characterTruncation($html,'/<main\b[^>]*>(.*?)<\/main>/s');
$this->param['html_style'] = characterTruncation($html,'/<style id="globalsojs-styles">(.*?)<\/style>/s');
$rs = $this->model->edit($this->param,['id'=>$this->param['id']]);
if($rs === false){
... ...
... ... @@ -26,6 +26,7 @@ class NavLogic extends BaseLogic
$this->model = new BNav();
}
/**
* @remark :保存数据
* @name :navSave
... ...
... ... @@ -110,8 +110,8 @@ class CategoryLogic extends BaseLogic
* @time :2023/8/21 17:14
*/
public function categorySave(){
DB::beginTransaction();
try {
// DB::beginTransaction();
// try {
if(isset($this->param['id']) && !empty($this->param['id'])){
//是否编辑路由
$id = $this->editCategoryRoute($this->param['id'],$this->param['route']);
... ... @@ -128,11 +128,11 @@ class CategoryLogic extends BaseLogic
$this->edit(['route'=>$route],['id'=>$id]);
//清除缓存
Common::del_user_cache('product_category',$this->user['project_id']);
DB::commit();
} catch (\Exception $e){
DB::rollBack();
$this->fail('系统错误,请联系管理员');
}
// DB::commit();
// } catch (\Exception $e){
// DB::rollBack();
// $this->fail('系统错误,请联系管理员');
// }
//通知更新
$notifyData = ['project_id'=>$this->user['project_id'], 'type'=>RouteMap::SOURCE_PRODUCT_CATE, 'route'=>$route];
$this->updateNotify($notifyData);
... ...
... ... @@ -461,7 +461,7 @@ class RankDataLogic extends BaseLogic
//保证关键词数
$keyword_num = DeployBuild::where('project_id', $project_id)->value('keyword_num');
$type = Project::where('id', $project_id)->value('type');
if($keyword_num && $type == 2 && $first_page_num >= $keyword_num){
if($keyword_num && $type == Project::TYPE_TWO && $first_page_num >= $keyword_num){
$model->compliance_day = $model->compliance_day + 1;
$model->is_compliance = 1;
... ...