|
...
|
...
|
@@ -151,12 +151,13 @@ class SyncProject extends Command |
|
|
|
'contract' => json_encode($param['files']),
|
|
|
|
'bill' => json_encode($param['images']),
|
|
|
|
];
|
|
|
|
if($param['plan_marketing'] == '白帽SEO方案'){
|
|
|
|
$data['seo_service_duration'] = $param['years'] ?? 0;
|
|
|
|
$data['seo_plan'] = 1;
|
|
|
|
}else{
|
|
|
|
$data['service_duration'] = $param['years'] ?? 0;
|
|
|
|
$data['plan'] = $this->versionData($param['plan_marketing']);
|
|
|
|
$seoPlan = Project::seoMap();
|
|
|
|
if (in_array($param['plan_marketing'], $seoPlan)) {
|
|
|
|
$data['deploy_build']['seo_service_duration'] = $param['years'] ?? 0;
|
|
|
|
$data['deploy_build']['seo_plan'] = $this->versionSeoData($param['plan_marketing'],$seoPlan);
|
|
|
|
} else {
|
|
|
|
$data['deploy_build']['service_duration'] = $param['years'] ?? 0;
|
|
|
|
$data['deploy_build']['plan'] = $this->versionData($param['plan_marketing']);
|
|
|
|
}
|
|
|
|
$renewModel = new ProjectRenew();
|
|
|
|
$rs = $renewModel->add($data);
|
|
...
|
...
|
@@ -183,8 +184,7 @@ class SyncProject extends Command |
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public function versionSeoData($param){
|
|
|
|
$data = Project::seoMap();
|
|
|
|
public function versionSeoData($param,$data){
|
|
|
|
$data = array_flip($data);
|
|
|
|
if(isset($data[$param])){
|
|
|
|
return $data[$param];
|
|
...
|
...
|
@@ -240,10 +240,11 @@ class SyncProject extends Command |
|
|
|
'bill'=>$param['images']
|
|
|
|
],
|
|
|
|
];
|
|
|
|
if($param['plan_marketing'] == '白帽SEO方案'){
|
|
|
|
$seoPlan = Project::seoMap();
|
|
|
|
if (in_array($param['plan_marketing'], $seoPlan)) {
|
|
|
|
$data['deploy_build']['seo_service_duration'] = $param['years'] ?? 0;
|
|
|
|
$data['deploy_build']['seo_plan'] = $this->versionSeoData($param['plan_marketing']);
|
|
|
|
}else{
|
|
|
|
$data['deploy_build']['seo_plan'] = $this->versionSeoData($param['plan_marketing'],$seoPlan);
|
|
|
|
} else {
|
|
|
|
$data['deploy_build']['service_duration'] = $param['years'] ?? 0;
|
|
|
|
$data['deploy_build']['plan'] = $this->versionData($param['plan_marketing']);
|
|
|
|
}
|
...
|
...
|
|