From 7e15211a2689fdfedee97c0aa80d57bab94fdcb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Wed, 23 Apr 2025 19:41:25 +0900 Subject: [PATCH] dbms_primeidc_init...1 --- extdbms/lib/Controllers/Client/CouponController.php | 2 +- extdbms/lib/Core/Database/QueryBuilder.php | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/extdbms/lib/Controllers/Client/CouponController.php b/extdbms/lib/Controllers/Client/CouponController.php index 10d5393..c6a2c29 100644 --- a/extdbms/lib/Controllers/Client/CouponController.php +++ b/extdbms/lib/Controllers/Client/CouponController.php @@ -40,7 +40,7 @@ class CouponController extends ClientController list($this->client, $this->member, $this->service) = $this->setDefaultRequestData(); //사용자별로 쿠폰정보보기 if ($this->client instanceof ClientEntity) { - // $this->getServiceService()->getModel()->where('client_code', $this->client->getClientCode()); + $this->getServiceService()->getModel()->where('client_code', $this->client->getClientCode()); } //업체명_일회성만 나오게하기 위해서 $this->getServiceService()->getModel()->like('server_code', '%_일회성'); diff --git a/extdbms/lib/Core/Database/QueryBuilder.php b/extdbms/lib/Core/Database/QueryBuilder.php index dc21fcb..6f469cd 100644 --- a/extdbms/lib/Core/Database/QueryBuilder.php +++ b/extdbms/lib/Core/Database/QueryBuilder.php @@ -165,17 +165,12 @@ class QueryBuilder $conditions[] = "$col $operator $placeholder"; $this->bindings[$placeholder] = $val; } - $this->where[] = '(' . implode(" $boolean ", $conditions) . ')'; + $this->where[] = ['condition' => '(' . implode(" $boolean ", $conditions) . ')', 'boolean' => $boolean]; } else { $placeholder = ':l_' . count($this->bindings); $condition = "$column $operator $placeholder"; - if (empty($this->where)) { - $this->where[] = $condition; - } else { - $last = array_pop($this->where); - $this->where[] = "($last $boolean $condition)"; - } $this->bindings[$placeholder] = $value; + $this->where[] = ['condition' => $condition, 'boolean' => $boolean]; } return $this; }