dbms_init...1
This commit is contained in:
parent
3dab3cc25f
commit
749afd83bc
@ -397,3 +397,10 @@ define('SERVICE_ITEM_TYPES', $_ENV['SERVICEINFO_ITEM_TYPES']
|
||||
define('SERVICE_NEW_INTERVAL', $_ENV['SERVICE_NEW_INTERVAL'] ?? $_SERVER['SERVICE_NEW_INTERVAL'] ?? 7);
|
||||
//미지급 Item_type
|
||||
define('SERVICE_UNPAID_ITEM_TYPE', $_ENV['SERVICE_UNPAID_ITEM_TYPE'] ?? $_SERVER['SERVICE_UNPAID_ITEM_TYPE'] ?? "SERVER");
|
||||
define(
|
||||
'SITE_PREFIX',
|
||||
[
|
||||
'Client' => $_ENV['PREFIX_Client'] ?? $_SERVER['PREFIX_Client'] ?? 'C',
|
||||
'Service' => $_ENV['PREFIX_Service'] ?? $_SERVER['PREFIX_Service'] ?? 'S'
|
||||
],
|
||||
);
|
||||
|
||||
@ -58,4 +58,12 @@ class ClientModel extends CustomerModel
|
||||
}
|
||||
return $rule;
|
||||
}
|
||||
|
||||
protected function create_process(array $formDatas): ClientEntity
|
||||
{
|
||||
$entity = parent::create_process($formDatas);
|
||||
// 생성 후, 추가 작업이 필요할 경우 여기에 작성
|
||||
$formDatas = ['code' => SITE_PREFIX['Client'] . $entity->getPK()];
|
||||
return $this->modify($entity, $formDatas);
|
||||
}
|
||||
}
|
||||
|
||||
@ -69,7 +69,8 @@ class ServiceModel extends CustomerModel
|
||||
protected function create_process(array $formDatas): ServiceEntity
|
||||
{
|
||||
$entity = parent::create_process($formDatas);
|
||||
//고객코드 Code 자동 생성 후(timestamp값) 수정
|
||||
return $this->modify($entity, ['code' => 'S' . time()]);
|
||||
// 생성 후, 추가 작업이 필요할 경우 여기에 작성
|
||||
$formDatas = ['code' => SITE_PREFIX['Service'] . time()];
|
||||
return $this->modify($entity, $formDatas);
|
||||
}
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@ abstract class CommonService
|
||||
throw new \Exception($message);
|
||||
}
|
||||
}
|
||||
protected function findAllDatas(array $columns = ['*']): mixed
|
||||
protected function findAllDatas_process(array $columns = ['*']): mixed
|
||||
{
|
||||
return $this->getModel()->select(implode(',', $columns))->findAll();
|
||||
}
|
||||
@ -86,7 +86,7 @@ abstract class CommonService
|
||||
$this->getModel()->where($where);
|
||||
}
|
||||
$entities = [];
|
||||
foreach ($this->findAllDatas($columns) as $entity) {
|
||||
foreach ($this->findAllDatas_process($columns) as $entity) {
|
||||
$entities[$entity->getPK()] = $entity;
|
||||
}
|
||||
return $entities;
|
||||
|
||||
@ -132,4 +132,10 @@ class ClientService extends CustomerService
|
||||
$this->getModel()->orLike($this->getModel()->getTable() . '.email', $word, 'both');
|
||||
parent::setList_WordFilter($word);
|
||||
}
|
||||
//OrderBy 처리
|
||||
public function setOrderBy(mixed $field = null, mixed $value = null): void
|
||||
{
|
||||
$this->getModel()->orderBy("name", 'ASC');
|
||||
parent::setOrderBy($field, $value);
|
||||
}
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ class ServiceService extends CustomerService
|
||||
{
|
||||
return $this->_searchIP;
|
||||
}
|
||||
protected function findAllDatas(array $columns = ['*']): mixed
|
||||
protected function findAllDatas_process(array $columns = ['*']): mixed
|
||||
{
|
||||
$ip = $this->getSearchIp();
|
||||
if ($ip) {
|
||||
@ -105,7 +105,7 @@ class ServiceService extends CustomerService
|
||||
AND serviceinfo_items.item_uid IN (SELECT uid FROM ipinfo WHERE ip = ?)";
|
||||
return $this->getModel()->query($sql, ['IP', $ip])->getResult(ServiceEntity::class);
|
||||
}
|
||||
return parent::findAllDatas($columns);
|
||||
return parent::findAllDatas_process($columns);
|
||||
}
|
||||
//기본 기능부분
|
||||
//FieldForm관련용
|
||||
|
||||
Loading…
Reference in New Issue
Block a user