dbmsv4 init...3
This commit is contained in:
parent
9c573df584
commit
8786ee0518
@ -215,6 +215,9 @@ abstract class CommonService
|
|||||||
//수정용
|
//수정용
|
||||||
protected function modify_process($entity, array $formDatas): CommonEntity
|
protected function modify_process($entity, array $formDatas): CommonEntity
|
||||||
{
|
{
|
||||||
|
$fields = array_keys($formDatas);
|
||||||
|
$this->getFormService()->setFormFields($fields);
|
||||||
|
$this->getFormService()->setFormRules('modify', $fields);
|
||||||
// 데이터 검증
|
// 데이터 검증
|
||||||
$this->getFormService()->validate($formDatas);
|
$this->getFormService()->validate($formDatas);
|
||||||
// 2. 폼 데이터를 엔티티에 병합합니다. (fill() 사용)
|
// 2. 폼 데이터를 엔티티에 병합합니다. (fill() 사용)
|
||||||
|
|||||||
@ -202,7 +202,7 @@ class ServiceService extends CustomerService
|
|||||||
}
|
}
|
||||||
protected function create_process(array $formDatas): ServiceEntity
|
protected function create_process(array $formDatas): ServiceEntity
|
||||||
{
|
{
|
||||||
//서비스코드생성
|
//생성폼에는 없는 필수항목 지정용(code)
|
||||||
$formDatas['code'] = $formDatas['site'] . "_s" . uniqid();
|
$formDatas['code'] = $formDatas['site'] . "_s" . uniqid();
|
||||||
//서비스 생성
|
//서비스 생성
|
||||||
$entity = parent::create_process($formDatas);
|
$entity = parent::create_process($formDatas);
|
||||||
@ -221,6 +221,10 @@ class ServiceService extends CustomerService
|
|||||||
{
|
{
|
||||||
//변경전 정보
|
//변경전 정보
|
||||||
$oldEntity = clone $entity;
|
$oldEntity = clone $entity;
|
||||||
|
|
||||||
|
//수정폼에는 없는 필수항목 지정용(code,amount)
|
||||||
|
$formDatas['code'] = $entity->getCode();
|
||||||
|
$formDatas['amount'] = $entity->getAmount();
|
||||||
//서비스 수정
|
//서비스 수정
|
||||||
$entity = parent::modify_process($entity, $formDatas);
|
$entity = parent::modify_process($entity, $formDatas);
|
||||||
if (!$entity instanceof ServiceEntity) {
|
if (!$entity instanceof ServiceEntity) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user