dbmsv4 init...5

This commit is contained in:
최준흠 2026-03-04 15:00:16 +09:00
parent 9c50ce0ef9
commit 4a1b40c39f
2 changed files with 4 additions and 9 deletions

View File

@ -102,7 +102,7 @@ class ServiceController extends CustomerController
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$uid}에 해당하는 서비스정보을 찾을수 없습니다.");
}
//대체서버 추가
service('equipment_serverservice')->attatchToService($entity, $serverinfo_uid);
service('equipment_serverservice')->attatchToService($entity, $serverinfo_uid, ['type' => 'alternative']);
// 트랜잭션 완료 및 커밋
$db->transComplete();
return static::class . '->' . __FUNCTION__ . "에서 {$this->getTitle()} 대체서버 추가가 완료되었습니다.";

View File

@ -156,10 +156,6 @@ class ServerService extends EquipmentService
if ($oldEntity->getIP()) {
service('part_ipservice')->detachFromServer($oldEntity);
}
} catch (\Throwable $e) {
log_message('debug', static::class . '->' . __FUNCTION__ . '에서:' . $e->getMessage());
}
try {
if ($entity->getIP()) {
service('part_ipservice')->attachToServer($entity);
}
@ -276,15 +272,15 @@ class ServerService extends EquipmentService
}
// 신규 메인서버
$newServer = $this->getEntity($serviceEntity->getServerInfoUid());
if (!$newServer instanceof ServerEntity) {
$newServerEntity = $this->getEntity($serviceEntity->getServerInfoUid());
if (!$newServerEntity instanceof ServerEntity) {
throw new RuntimeException(static::class . '->' . __FUNCTION__ .
"에서 오류발생: {$serviceEntity->getServerInfoUid()} 신규 메인 서버정보를 찾을수 없습니다.");
}
// 신규 서버를 서비스에 붙임(occupied 처리 + client/service uid 세팅)
// type은 기존 메인서버의 type을 승계 (normal/dedicated/defence 등)
$this->attatchToService($serviceEntity, $newServer->getPK(), [
$this->attatchToService($serviceEntity, $newServerEntity->getPK(), [
'type' => $oldServer->getType()
]);
@ -292,5 +288,4 @@ class ServerService extends EquipmentService
// 여기서는 기존 동작 유지: alternative로만 바꿈
parent::modify_process($oldServer, ['type' => 'alternative']);
}
}