作者 lyh

gx

... ... @@ -532,6 +532,8 @@ class ProjectLogic extends BaseLogic
* @time :2023/11/8 14:23
*/
public function copyProject(){
DB::beginTransaction();
try {
//复制初始项目
$data = $this->model::where('id', $this->param['project_id'])->first();
$data = $data->getAttributes();
... ... @@ -596,6 +598,12 @@ class ProjectLogic extends BaseLogic
$settingData['project_id'] = $project_id;
$settingTemplateModel->insert($settingData);
}
DB::commit();
}catch (\Exception $e){
DB::rollBack();
$this->fail('error');
}
$this->copyMysql($this->param['project_id'],$project_id);
return $this->success($data);
}
... ...