|
...
|
...
|
@@ -132,8 +132,8 @@ class ProjectLogic extends BaseLogic |
|
|
|
* @time :2023/8/30 11:57
|
|
|
|
*/
|
|
|
|
public function projectSave(){
|
|
|
|
// DB::beginTransaction();
|
|
|
|
// try {
|
|
|
|
DB::beginTransaction();
|
|
|
|
try {
|
|
|
|
$this->param['project_location'] = 0;//TODO::图片文件存储不同地方,上线后删除
|
|
|
|
if($this->param['type'] == Project::TYPE_SEVEN){
|
|
|
|
//错误单直接返回,单独处理
|
|
...
|
...
|
@@ -151,20 +151,15 @@ class ProjectLogic extends BaseLogic |
|
|
|
$this->saveProjectDeployOptimize($this->param['deploy_optimize']);
|
|
|
|
//保存售后信息
|
|
|
|
$this->saveProjectAfter($this->param['project_after']);
|
|
|
|
|
|
|
|
$this->saveMinorLanguages($this->param['minor_language'] ?? []);
|
|
|
|
//保存询盘过滤配置
|
|
|
|
// $this->param['inquiry_filter_config']['project_id'] = $this->param['id'];
|
|
|
|
// $this->saveInquiryFilterConfig($this->param['inquiry_filter_config']);
|
|
|
|
$this->syncImageFile($this->param['project_location'],$this->param['id']);
|
|
|
|
//创建站点
|
|
|
|
// $this->createSite($this->param);
|
|
|
|
(new SyncService())->projectAcceptAddress($this->param['id']);
|
|
|
|
// }
|
|
|
|
// DB::commit();
|
|
|
|
// }catch (\Exception $e){
|
|
|
|
// DB::rollBack();
|
|
|
|
// $this->fail('保存失败,请联系管理员');
|
|
|
|
}
|
|
|
|
DB::commit();
|
|
|
|
}catch (\Exception $e){
|
|
|
|
DB::rollBack();
|
|
|
|
$this->fail('保存失败,请联系管理员');
|
|
|
|
}
|
|
|
|
|
|
|
|
return $this->success();
|
|
...
|
...
|
@@ -189,6 +184,9 @@ class ProjectLogic extends BaseLogic |
|
|
|
$param['extend_type'] = Project::TYPE_FIVE;
|
|
|
|
unset($param['type']);
|
|
|
|
}
|
|
|
|
if((($param['type'] == Project::TYPE_TWO) || ($param['type'] == Project::TYPE_THREE)) && empty($param['uptime'])){
|
|
|
|
$param['uptime'] = date('Y-m-d H:i:s');
|
|
|
|
}
|
|
|
|
if(isset($param['level']) && !empty($param['level'])){
|
|
|
|
$param['level'] = Arr::arrToSet($param['level']);
|
|
|
|
}
|
|
...
|
...
|
@@ -228,6 +226,7 @@ class ProjectLogic extends BaseLogic |
|
|
|
$param['is_visualization'] = json_encode($param['is_visualization']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$this->model->edit($param,['id'=>$param['id']]);
|
|
|
|
Common::del_user_cache($this->model->getTable(),$param['id']);
|
|
|
|
return $this->success();
|
...
|
...
|
|