|
...
|
...
|
@@ -147,35 +147,30 @@ class ProjectLogic extends BaseLogic |
|
|
|
* @time :2023/8/30 11:57
|
|
|
|
*/
|
|
|
|
public function projectSave(){
|
|
|
|
DB::beginTransaction();
|
|
|
|
try {
|
|
|
|
if($this->param['type'] == Project::TYPE_SEVEN){
|
|
|
|
//错误单直接返回,单独处理
|
|
|
|
$this->setTypeSevenEdit($this->param);
|
|
|
|
}else{
|
|
|
|
//初始化项目
|
|
|
|
$this->createProjectData($this->param);
|
|
|
|
//保存项目信息
|
|
|
|
$this->saveProject($this->param);
|
|
|
|
//保存建站部署信息
|
|
|
|
$this->saveProjectDeployBuild($this->param['deploy_build']);
|
|
|
|
//保存付费信息
|
|
|
|
$this->saveProjectPayment($this->param['payment']);
|
|
|
|
//保存优化信息
|
|
|
|
$this->saveProjectDeployOptimize($this->param['deploy_optimize']);
|
|
|
|
//保存售后信息
|
|
|
|
$this->saveProjectAfter($this->param['project_after']);
|
|
|
|
//单独保存小语种配置
|
|
|
|
$this->saveMinorLanguages($this->param['minor_languages'] ?? [],$this->param['id']);
|
|
|
|
//同步图片文件
|
|
|
|
$this->syncImageFile($this->param['project_location'],$this->param['id']);
|
|
|
|
//同步信息表
|
|
|
|
(new SyncService())->projectAcceptAddress($this->param['id']);
|
|
|
|
}
|
|
|
|
DB::commit();
|
|
|
|
}catch (\Exception $e){
|
|
|
|
DB::rollBack();
|
|
|
|
$this->fail('保存失败,请联系管理员');
|
|
|
|
if($this->param['type'] == Project::TYPE_SEVEN){
|
|
|
|
//错误单直接返回,单独处理
|
|
|
|
$this->setTypeSevenEdit($this->param);
|
|
|
|
}else{
|
|
|
|
//初始化项目
|
|
|
|
$this->createProjectData($this->param);
|
|
|
|
//保存项目信息
|
|
|
|
$this->saveProject($this->param);
|
|
|
|
//保存建站部署信息
|
|
|
|
$this->saveProjectDeployBuild($this->param['deploy_build']);
|
|
|
|
//保存付费信息
|
|
|
|
$this->saveProjectPayment($this->param['payment']);
|
|
|
|
//保存优化信息
|
|
|
|
$this->saveProjectDeployOptimize($this->param['deploy_optimize']);
|
|
|
|
//保存售后信息
|
|
|
|
$this->saveProjectAfter($this->param['project_after']);
|
|
|
|
//单独保存小语种配置
|
|
|
|
$this->saveMinorLanguages($this->param['minor_languages'] ?? [],$this->param['id']);
|
|
|
|
//同步图片文件
|
|
|
|
$this->syncImageFile($this->param['project_location'],$this->param['id']);
|
|
|
|
//同步信息表
|
|
|
|
(new SyncService())->projectAcceptAddress($this->param['id']);
|
|
|
|
//双向绑定服务器
|
|
|
|
$this->setServers($this->param['server_id'],$this->param['id']);
|
|
|
|
}
|
|
|
|
return $this->success();
|
|
|
|
}
|
...
|
...
|
|