作者 lyh

ggx

@@ -74,8 +74,14 @@ class ProjectLogic extends BaseLogic @@ -74,8 +74,14 @@ class ProjectLogic extends BaseLogic
74 * @time :2023/8/30 11:57 74 * @time :2023/8/30 11:57
75 */ 75 */
76 public function projectSave(){ 76 public function projectSave(){
  77 +
77 DB::beginTransaction(); 78 DB::beginTransaction();
78 try { 79 try {
  80 + if($this->param['type'] == Project::TYPE_SEVEN){
  81 + //错误单直接返回,单独处理
  82 + $this->setTypeStatusEdit($this->param);
  83 + }else{
  84 + //初始化项目
79 $this->createProjectData($this->param); 85 $this->createProjectData($this->param);
80 //保存项目信息 86 //保存项目信息
81 $this->saveProject($this->param); 87 $this->saveProject($this->param);
@@ -87,6 +93,7 @@ class ProjectLogic extends BaseLogic @@ -87,6 +93,7 @@ class ProjectLogic extends BaseLogic
87 $this->saveProjectDeployOptimize($this->param['deploy_optimize']); 93 $this->saveProjectDeployOptimize($this->param['deploy_optimize']);
88 //保存售后信息 94 //保存售后信息
89 $this->saveProjectAfter($this->param['project_after']); 95 $this->saveProjectAfter($this->param['project_after']);
  96 + }
90 DB::commit(); 97 DB::commit();
91 }catch (\Exception $e){ 98 }catch (\Exception $e){
92 DB::rollBack(); 99 DB::rollBack();
@@ -242,6 +249,18 @@ class ProjectLogic extends BaseLogic @@ -242,6 +249,18 @@ class ProjectLogic extends BaseLogic
242 return $this->success(); 249 return $this->success();
243 } 250 }
244 251
  252 + /**
  253 + * @remark :根据类型状态设置
  254 + * @name :setTypeStatusEdit
  255 + * @author :lyh
  256 + * @method :post
  257 + * @time :2023/9/12 11:20
  258 + */
  259 + public function setTypeStatusEdit($param){
  260 + //TODO::删除项目并添加到续费单
  261 +
  262 + return true;
  263 + }
245 264
246 /** 265 /**
247 * @remark :初始化数据库 266 * @remark :初始化数据库
@@ -410,7 +429,7 @@ class ProjectLogic extends BaseLogic @@ -410,7 +429,7 @@ class ProjectLogic extends BaseLogic
410 } 429 }
411 430
412 /** 431 /**
413 - * @remark : 432 + * @remark :删除
414 * @name :projectDel 433 * @name :projectDel
415 * @author :lyh 434 * @author :lyh
416 * @method :post 435 * @method :post
@@ -27,6 +27,7 @@ class Project extends Base @@ -27,6 +27,7 @@ class Project extends Base
27 const TYPE_FIVE = 5;//未续费网站 27 const TYPE_FIVE = 5;//未续费网站
28 const TYPE_SIX = 6;//特殊推广项目 28 const TYPE_SIX = 6;//特殊推广项目
29 29
  30 + const TYPE_SEVEN = 7;//错误单
30 const MYSQL_ID = 2;//默认数据库id 31 const MYSQL_ID = 2;//默认数据库id
31 /** 32 /**
32 * 星级客户 33 * 星级客户