dbms_primeidc_init...1
This commit is contained in:
parent
bfc645820b
commit
f9da1086da
@ -31,7 +31,13 @@ class NavigatorController extends BaseController
|
||||
$clients = [];
|
||||
$ip = $this->getRequest('ip');
|
||||
//IP형식이 ipv4인지 확인 후 값가져오기
|
||||
$services = $ip && $this->helper->isIPAddress($ip) ? $this->getServiceervice()->getEntitysByIP($ip) : $this->getServiceervice()->getEntitys();
|
||||
$services = [];
|
||||
if ($ip && $this->helper->isIPAddress($ip)) {
|
||||
$services = $this->getServiceervice()->getEntitysByIP($ip);
|
||||
} else {
|
||||
$this->getServiceervice()->getModel()->like($ip);
|
||||
$this->getServiceervice()->getEntitys();
|
||||
}
|
||||
foreach ($services as $service) {
|
||||
$clients[$service->getPK()] = $this->getClientService()->getEntityByCode($service->getClientCode());
|
||||
}
|
||||
|
||||
@ -149,6 +149,21 @@ abstract class Model
|
||||
{
|
||||
$this->_querys["JOIN"] = " {$type} JOIN {$table} ON {$match}";
|
||||
}
|
||||
final public function like(string $column, string $value, string $option = "both"): void
|
||||
{
|
||||
switch ($option) {
|
||||
case 'before':
|
||||
$value = "%{$value}";
|
||||
break;
|
||||
case 'after':
|
||||
$value = "{$value}%";
|
||||
break;
|
||||
default:
|
||||
$value = "%{$value}%";
|
||||
break;
|
||||
}
|
||||
$this->_querys["LIKE"] = "{$column} LIKE '{$$value}'";
|
||||
}
|
||||
final public function orderBy(string $column, string $direction = "DESC"): void
|
||||
{
|
||||
$this->_querys["ORDERBY"] = " ORDER BY {$column} {$direction}";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user