|
@@ -151,12 +151,13 @@ class SyncProject extends Command |
|
@@ -151,12 +151,13 @@ class SyncProject extends Command |
|
151
|
'contract' => json_encode($param['files']),
|
151
|
'contract' => json_encode($param['files']),
|
|
152
|
'bill' => json_encode($param['images']),
|
152
|
'bill' => json_encode($param['images']),
|
|
153
|
];
|
153
|
];
|
|
154
|
- if($param['plan_marketing'] == '白帽SEO方案'){
|
|
|
|
155
|
- $data['seo_service_duration'] = $param['years'] ?? 0;
|
|
|
|
156
|
- $data['seo_plan'] = 1;
|
|
|
|
157
|
- }else{
|
|
|
|
158
|
- $data['service_duration'] = $param['years'] ?? 0;
|
|
|
|
159
|
- $data['plan'] = $this->versionData($param['plan_marketing']);
|
154
|
+ $seoPlan = Project::seoMap();
|
|
|
|
155
|
+ if (in_array($param['plan_marketing'], $seoPlan)) {
|
|
|
|
156
|
+ $data['deploy_build']['seo_service_duration'] = $param['years'] ?? 0;
|
|
|
|
157
|
+ $data['deploy_build']['seo_plan'] = $this->versionSeoData($param['plan_marketing'],$seoPlan);
|
|
|
|
158
|
+ } else {
|
|
|
|
159
|
+ $data['deploy_build']['service_duration'] = $param['years'] ?? 0;
|
|
|
|
160
|
+ $data['deploy_build']['plan'] = $this->versionData($param['plan_marketing']);
|
|
160
|
}
|
161
|
}
|
|
161
|
$renewModel = new ProjectRenew();
|
162
|
$renewModel = new ProjectRenew();
|
|
162
|
$rs = $renewModel->add($data);
|
163
|
$rs = $renewModel->add($data);
|
|
@@ -183,8 +184,7 @@ class SyncProject extends Command |
|
@@ -183,8 +184,7 @@ class SyncProject extends Command |
|
183
|
}
|
184
|
}
|
|
184
|
}
|
185
|
}
|
|
185
|
|
186
|
|
|
186
|
- public function versionSeoData($param){
|
|
|
|
187
|
- $data = Project::seoMap();
|
187
|
+ public function versionSeoData($param,$data){
|
|
188
|
$data = array_flip($data);
|
188
|
$data = array_flip($data);
|
|
189
|
if(isset($data[$param])){
|
189
|
if(isset($data[$param])){
|
|
190
|
return $data[$param];
|
190
|
return $data[$param];
|
|
@@ -240,10 +240,11 @@ class SyncProject extends Command |
|
@@ -240,10 +240,11 @@ class SyncProject extends Command |
|
240
|
'bill'=>$param['images']
|
240
|
'bill'=>$param['images']
|
|
241
|
],
|
241
|
],
|
|
242
|
];
|
242
|
];
|
|
243
|
- if($param['plan_marketing'] == '白帽SEO方案'){
|
243
|
+ $seoPlan = Project::seoMap();
|
|
|
|
244
|
+ if (in_array($param['plan_marketing'], $seoPlan)) {
|
|
244
|
$data['deploy_build']['seo_service_duration'] = $param['years'] ?? 0;
|
245
|
$data['deploy_build']['seo_service_duration'] = $param['years'] ?? 0;
|
|
245
|
- $data['deploy_build']['seo_plan'] = $this->versionSeoData($param['plan_marketing']);
|
|
|
|
246
|
- }else{
|
246
|
+ $data['deploy_build']['seo_plan'] = $this->versionSeoData($param['plan_marketing'],$seoPlan);
|
|
|
|
247
|
+ } else {
|
|
247
|
$data['deploy_build']['service_duration'] = $param['years'] ?? 0;
|
248
|
$data['deploy_build']['service_duration'] = $param['years'] ?? 0;
|
|
248
|
$data['deploy_build']['plan'] = $this->versionData($param['plan_marketing']);
|
249
|
$data['deploy_build']['plan'] = $this->versionData($param['plan_marketing']);
|
|
249
|
}
|
250
|
}
|