作者 lyh

gx

... ... @@ -64,7 +64,7 @@ class ServerConfigController extends BaseController
* @date 2023/4/23
*/
public function save(ServerConfigRequest $request, ServerConfigLogic $logic){
$data = $logic->serviceConfigSave($this->param);
$data = $logic->serviceConfigSave();
return $this->success($data);
}
... ...
... ... @@ -74,10 +74,10 @@ class ServerConfigLogic extends BaseLogic
if($project_list === false){
$this->fail('项目不存在或者已经删除');
}
DB::beginTransaction();
try {
// DB::beginTransaction();
// try {
//保存配置
$res = $this->model->add($this->param);
$res = $this->model->save($this->param);
if ($this->param['type'] == ServerConfig::TYPE_SERVER) {
$data['serve_id'] = $res['id'];
}else{
... ... @@ -93,11 +93,11 @@ class ServerConfigLogic extends BaseLogic
// //创建表
// ProjectServer::initTable($project);
// }
DB::commit();
} catch (\Exception $e) {
DB::rollBack();
$this->fail('保存失败');
}
// DB::commit();
// } catch (\Exception $e) {
// DB::rollBack();
// $this->fail('保存失败');
// }
return $this->success();
}
... ...