|
...
|
...
|
@@ -537,6 +537,7 @@ class ProjectLogic extends BaseLogic |
|
|
|
//复制初始项目
|
|
|
|
$data = $this->model::where('id', $this->param['project_id'])->first();
|
|
|
|
$data = $data->getAttributes();
|
|
|
|
$type = $data['type'];
|
|
|
|
$data['type'] = 0;
|
|
|
|
$data['title'] = $data['title'].'-copy';
|
|
|
|
unset($data['id']);
|
|
...
|
...
|
@@ -603,8 +604,9 @@ class ProjectLogic extends BaseLogic |
|
|
|
DB::rollBack();
|
|
|
|
$this->fail('error');
|
|
|
|
}
|
|
|
|
|
|
|
|
$this->copyMysql($this->param['project_id'],$project_id);
|
|
|
|
if($type != 0){
|
|
|
|
$this->copyMysql($this->param['project_id'],$project_id);
|
|
|
|
}
|
|
|
|
return $this->success($data);
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|