作者 lyh

gx

@@ -537,6 +537,7 @@ class ProjectLogic extends BaseLogic @@ -537,6 +537,7 @@ class ProjectLogic extends BaseLogic
537 //复制初始项目 537 //复制初始项目
538 $data = $this->model::where('id', $this->param['project_id'])->first(); 538 $data = $this->model::where('id', $this->param['project_id'])->first();
539 $data = $data->getAttributes(); 539 $data = $data->getAttributes();
  540 + $type = $data['type'];
540 $data['type'] = 0; 541 $data['type'] = 0;
541 $data['title'] = $data['title'].'-copy'; 542 $data['title'] = $data['title'].'-copy';
542 unset($data['id']); 543 unset($data['id']);
@@ -603,8 +604,9 @@ class ProjectLogic extends BaseLogic @@ -603,8 +604,9 @@ class ProjectLogic extends BaseLogic
603 DB::rollBack(); 604 DB::rollBack();
604 $this->fail('error'); 605 $this->fail('error');
605 } 606 }
606 -  
607 - $this->copyMysql($this->param['project_id'],$project_id); 607 + if($type != 0){
  608 + $this->copyMysql($this->param['project_id'],$project_id);
  609 + }
608 return $this->success($data); 610 return $this->success($data);
609 } 611 }
610 612