dbmsv4 init...3
This commit is contained in:
parent
bec3fe8ec4
commit
5b9e3d59a5
@ -140,7 +140,7 @@ abstract class CommonForm
|
|||||||
// run()에는 데이터만 전달 (setRules에서 이미 설정됨)
|
// run()에는 데이터만 전달 (setRules에서 이미 설정됨)
|
||||||
$result = $this->_validation->run($formDatas);
|
$result = $this->_validation->run($formDatas);
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
$message = __METHOD__ . "에서 데이터 검증 오류발생: " . var_export($this->_validation->getErrors(), true);
|
$message = static::class . '->' . __FUNCTION__ . "에서 데이터 검증 오류발생: " . var_export($this->_validation->getErrors(), true);
|
||||||
log_message('debug', $message);
|
log_message('debug', $message);
|
||||||
throw new RuntimeException($message);
|
throw new RuntimeException($message);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -67,7 +67,7 @@ abstract class CommonService
|
|||||||
} catch (DatabaseException $e) {
|
} catch (DatabaseException $e) {
|
||||||
$errorMessage = sprintf(
|
$errorMessage = sprintf(
|
||||||
"\n------DB Query 오류 (%s)-----\nQuery: %s\nError: %s\n------------------------------\n",
|
"\n------DB Query 오류 (%s)-----\nQuery: %s\nError: %s\n------------------------------\n",
|
||||||
__FUNCTION__,
|
static::class . '->' . __FUNCTION__,
|
||||||
$this->model->getLastQuery() ?? "No Query Available",
|
$this->model->getLastQuery() ?? "No Query Available",
|
||||||
$e->getMessage()
|
$e->getMessage()
|
||||||
);
|
);
|
||||||
@ -76,7 +76,7 @@ abstract class CommonService
|
|||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$errorMessage = sprintf(
|
$errorMessage = sprintf(
|
||||||
"\n------일반 오류 (%s)-----\nError: %s\n------------------------------\n",
|
"\n------일반 오류 (%s)-----\nError: %s\n------------------------------\n",
|
||||||
__FUNCTION__,
|
static::class . '->' . __FUNCTION__,
|
||||||
$e->getMessage()
|
$e->getMessage()
|
||||||
);
|
);
|
||||||
throw new \Exception($errorMessage, $e->getCode(), $e);
|
throw new \Exception($errorMessage, $e->getCode(), $e);
|
||||||
@ -108,7 +108,7 @@ abstract class CommonService
|
|||||||
} catch (DatabaseException $e) {
|
} catch (DatabaseException $e) {
|
||||||
$errorMessage = sprintf(
|
$errorMessage = sprintf(
|
||||||
"\n------DB Query 오류 (%s)-----\nQuery: %s\nError: %s\n------------------------------\n",
|
"\n------DB Query 오류 (%s)-----\nQuery: %s\nError: %s\n------------------------------\n",
|
||||||
__FUNCTION__,
|
static::class . '->' . __FUNCTION__,
|
||||||
$this->model->getLastQuery() ?? "No Query Available",
|
$this->model->getLastQuery() ?? "No Query Available",
|
||||||
$e->getMessage()
|
$e->getMessage()
|
||||||
);
|
);
|
||||||
@ -117,7 +117,7 @@ abstract class CommonService
|
|||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$errorMessage = sprintf(
|
$errorMessage = sprintf(
|
||||||
"\n------일반 오류 (%s)-----\nError: %s\n------------------------------\n",
|
"\n------일반 오류 (%s)-----\nError: %s\n------------------------------\n",
|
||||||
__FUNCTION__,
|
static::class . '->' . __FUNCTION__,
|
||||||
$e->getMessage()
|
$e->getMessage()
|
||||||
);
|
);
|
||||||
throw new \Exception($errorMessage, $e->getCode(), $e);
|
throw new \Exception($errorMessage, $e->getCode(), $e);
|
||||||
@ -199,7 +199,7 @@ abstract class CommonService
|
|||||||
// DatabaseException을 포착하면 자동으로 롤백 처리됨
|
// DatabaseException을 포착하면 자동으로 롤백 처리됨
|
||||||
throw new RuntimeException(sprintf(
|
throw new RuntimeException(sprintf(
|
||||||
"\n----[%s]에서 트랜잭션 실패: DB 오류----\n%s\n%s\n------------------------------\n",
|
"\n----[%s]에서 트랜잭션 실패: DB 오류----\n%s\n%s\n------------------------------\n",
|
||||||
__METHOD__,
|
static::class . '->' . __FUNCTION__,
|
||||||
$this->model->getLastQuery(),
|
$this->model->getLastQuery(),
|
||||||
$e->getMessage()
|
$e->getMessage()
|
||||||
), $e->getCode(), $e);
|
), $e->getCode(), $e);
|
||||||
@ -263,7 +263,7 @@ abstract class CommonService
|
|||||||
// DatabaseException을 포착하면 자동으로 롤백 처리됨
|
// DatabaseException을 포착하면 자동으로 롤백 처리됨
|
||||||
throw new RuntimeException(sprintf(
|
throw new RuntimeException(sprintf(
|
||||||
"\n----[%s]에서 트랜잭션 실패: DB 오류----\n%s\n%s\n------------------------------\n",
|
"\n----[%s]에서 트랜잭션 실패: DB 오류----\n%s\n%s\n------------------------------\n",
|
||||||
__METHOD__,
|
static::class . '->' . __FUNCTION__,
|
||||||
$this->model->getLastQuery(),
|
$this->model->getLastQuery(),
|
||||||
$e->getMessage()
|
$e->getMessage()
|
||||||
), $e->getCode(), $e);
|
), $e->getCode(), $e);
|
||||||
@ -342,7 +342,7 @@ abstract class CommonService
|
|||||||
// DatabaseException을 포착하면 자동으로 롤백 처리됨
|
// DatabaseException을 포착하면 자동으로 롤백 처리됨
|
||||||
throw new RuntimeException(sprintf(
|
throw new RuntimeException(sprintf(
|
||||||
"\n----[%s]에서 트랜잭션 실패: DB 오류----\n%s\n%s\n------------------------------\n",
|
"\n----[%s]에서 트랜잭션 실패: DB 오류----\n%s\n%s\n------------------------------\n",
|
||||||
__METHOD__,
|
__FUNCTION__,
|
||||||
$this->model->getLastQuery(),
|
$this->model->getLastQuery(),
|
||||||
$e->getMessage()
|
$e->getMessage()
|
||||||
), $e->getCode(), $e);
|
), $e->getCode(), $e);
|
||||||
@ -385,7 +385,7 @@ abstract class CommonService
|
|||||||
// DatabaseException을 포착하면 자동으로 롤백 처리됨
|
// DatabaseException을 포착하면 자동으로 롤백 처리됨
|
||||||
throw new RuntimeException(sprintf(
|
throw new RuntimeException(sprintf(
|
||||||
"\n----[%s]에서 트랜잭션 실패: DB 오류----\n%s\n%s\n------------------------------\n",
|
"\n----[%s]에서 트랜잭션 실패: DB 오류----\n%s\n%s\n------------------------------\n",
|
||||||
__METHOD__,
|
__FUNCTION__,
|
||||||
$this->model->getLastQuery(),
|
$this->model->getLastQuery(),
|
||||||
$e->getMessage()
|
$e->getMessage()
|
||||||
), $e->getCode(), $e);
|
), $e->getCode(), $e);
|
||||||
|
|||||||
@ -224,7 +224,7 @@ class ServerService extends EquipmentService
|
|||||||
{
|
{
|
||||||
//필수항목검사
|
//필수항목검사
|
||||||
if (!array_key_exists('chassisinfo_uid', $formDatas)) {
|
if (!array_key_exists('chassisinfo_uid', $formDatas)) {
|
||||||
throw new RuntimeException(__METHOD__ . '에서 오류발생: 샷시정보가 정의되지 않았습니다.');
|
throw new RuntimeException(static::class . '->' . __FUNCTION__ . '에서 오류발생: 샷시정보가 정의되지 않았습니다.');
|
||||||
}
|
}
|
||||||
//변경전 정보
|
//변경전 정보
|
||||||
$oldEntity = clone $entity;
|
$oldEntity = clone $entity;
|
||||||
|
|||||||
@ -24,7 +24,7 @@ abstract class PartType2Service extends PartService
|
|||||||
$entity = $this->getPartEntityByServerPart($serverPartEntity);
|
$entity = $this->getPartEntityByServerPart($serverPartEntity);
|
||||||
//상태확인
|
//상태확인
|
||||||
if ($entity->getStatus() !== STATUS['AVAILABLE']) {
|
if ($entity->getStatus() !== STATUS['AVAILABLE']) {
|
||||||
throw new \Exception(__METHOD__ . ":에서 오류발생: {$entity->getTitle()}는 사용중입니다.");
|
throw new \Exception(static::class . '->' . __FUNCTION__ . ":에서 오류발생: {$entity->getTitle()}는 사용중입니다.");
|
||||||
}
|
}
|
||||||
//파트정보 수정
|
//파트정보 수정
|
||||||
return parent::modify_process($entity, $formDatas);
|
return parent::modify_process($entity, $formDatas);
|
||||||
|
|||||||
@ -23,7 +23,7 @@ abstract class PartType3Service extends PartType2Service
|
|||||||
//파트정보가져오기
|
//파트정보가져오기
|
||||||
$entity = $this->getPartEntityByServer($serverEntity);
|
$entity = $this->getPartEntityByServer($serverEntity);
|
||||||
if ($entity->getStatus() !== STATUS['AVAILABLE']) {
|
if ($entity->getStatus() !== STATUS['AVAILABLE']) {
|
||||||
throw new \Exception(__METHOD__ . ":에서 오류발생: {$entity->getTitle()}는 사용중입니다.");
|
throw new \Exception(static::class . '->' . __FUNCTION__ . ":에서 오류발생: {$entity->getTitle()}는 사용중입니다.");
|
||||||
}
|
}
|
||||||
//파트정보 수정
|
//파트정보 수정
|
||||||
return parent::modify_process($entity, $formDatas);
|
return parent::modify_process($entity, $formDatas);
|
||||||
|
|||||||
@ -149,6 +149,12 @@ class PaymentService extends CommonService
|
|||||||
//기본 기능부분
|
//기본 기능부분
|
||||||
protected function getEntity_process(mixed $entity): PaymentEntity
|
protected function getEntity_process(mixed $entity): PaymentEntity
|
||||||
{
|
{
|
||||||
|
$errorMessage = sprintf(
|
||||||
|
"\n------Last Query (%s)-----\nQuery: %s\n------------------------------\n",
|
||||||
|
static::class . '->' . __FUNCTION__,
|
||||||
|
$this->model->getLastQuery() ?? "No Query Available",
|
||||||
|
);
|
||||||
|
log_message('error', $errorMessage);
|
||||||
return $entity;
|
return $entity;
|
||||||
}
|
}
|
||||||
//List 검색용
|
//List 검색용
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user