From efdf91fa074c2a39aa69241f6d1bd6b04c4559b9 Mon Sep 17 00:00:00 2001 From: "SHUTTA, Takafumi" <> Date: Mon, 22 Apr 2019 00:50:26 +0900 Subject: [PATCH 1/3] =?UTF-8?q?Fix=20issue=20of=20EC-CUBE#93=20=E5=95=86?= =?UTF-8?q?=E5=93=81=E4=B8=80=E8=A6=A7=E3=81=AE=E4=BE=A1=E6=A0=BC=E9=A0=86?= =?UTF-8?q?=E4=B8=A6=E3=81=B3=E6=9B=BF=E3=81=88=E3=81=8C=E7=99=BB=E9=8C=B2?= =?UTF-8?q?=E3=81=95=E3=82=8C=E3=81=A6=E3=81=84=E3=81=AA=E3=81=84=E5=95=86?= =?UTF-8?q?=E5=93=81=E8=A6=8F=E6=A0=BC=E3=81=AB=E5=BD=B1=E9=9F=BF=E3=81=95?= =?UTF-8?q?=E3=82=8C=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit del_flgを考慮し登録されていない規格の商品価格を含めないように修正。 refs EC-CUBE#93 --- data/class/SC_Product.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/class/SC_Product.php b/data/class/SC_Product.php index 2be0ac0aa0..9424ca2576 100644 --- a/data/class/SC_Product.php +++ b/data/class/SC_Product.php @@ -82,7 +82,7 @@ public function findProductIdsOrder(&$objQuery, $arrVal = array()) $o_table = $this->arrOrderData['table']; $o_order = $this->arrOrderData['order']; $objQuery->setOrder("T2.$o_col $o_order"); - $sub_sql = $objQuery->getSql($o_col, "$o_table AS T2", 'T2.product_id = alldtl.product_id'); + $sub_sql = $objQuery->getSql($o_col, "$o_table AS T2", 'T2.product_id = alldtl.product_id AND T2.del_flg = 0'); $sub_sql = $objQuery->dbFactory->addLimitOffset($sub_sql, 1); $objQuery->setOrder("($sub_sql) $o_order, product_id"); From 7b14ebec6f458d7a9d886a60b1b0f05051c6417c Mon Sep 17 00:00:00 2001 From: "SHUTTA, Takafumi" <> Date: Mon, 22 Apr 2019 03:37:25 +0900 Subject: [PATCH 2/3] =?UTF-8?q?MySQL=E3=81=AE=E5=A0=B4=E5=90=88=E3=81=AB?= =?UTF-8?q?=E3=80=81SC=5FProduct=5FfindProductIdsOrderTest=E3=81=AEtestFin?= =?UTF-8?q?dProductIdsOrder=5FarrOrderData=E3=81=AE=E8=A8=AD=E5=AE=9A?= =?UTF-8?q?=E3=81=AB=E3=82=88=E3=82=8B=E4=B8=A6=E3=81=B3=E9=A0=86()?= =?UTF-8?q?=E3=81=A7=E3=81=AE=E3=83=86=E3=82=B9=E3=83=88=E3=81=AB=E3=81=93?= =?UTF-8?q?=E3=81=91=E3=81=A6=E3=81=84=E3=81=9F=E3=81=AE=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=E3=80=82=20=E5=89=8A=E9=99=A4=E3=81=95=E3=82=8C?= =?UTF-8?q?=E3=81=9F=E5=95=86=E5=93=81=E3=81=AE=E5=A0=B4=E5=90=88=E3=81=AB?= =?UTF-8?q?null=E3=81=AB=E3=81=AA=E3=82=8B=E3=81=8C=E3=80=81null=E3=81=AE?= =?UTF-8?q?=E4=B8=A6=E3=81=B3=E3=81=AFPostgreSQL=E3=81=A0=E3=81=A8?= =?UTF-8?q?=E4=B8=8B=E4=BD=8D=E3=81=ABMySQL=E3=81=A0=E3=81=A8=E4=B8=8A?= =?UTF-8?q?=E4=BD=8D=E3=81=AB=E6=89=B1=E3=82=8F=E3=82=8C=E3=82=8B=E5=B7=AE?= =?UTF-8?q?=E7=95=B0=E3=81=8C=E3=81=82=E3=81=A3=E3=81=9F=E3=80=82=20?= =?UTF-8?q?=E3=81=9F=E3=81=A0=E3=80=81=E5=89=8A=E9=99=A4=E3=81=95=E3=82=8C?= =?UTF-8?q?=E3=81=9F=E5=95=86=E5=93=81=E3=81=AF=E3=81=9D=E3=82=82=E3=81=9D?= =?UTF-8?q?=E3=82=82=E6=A4=9C=E7=B4=A2=E5=AF=BE=E8=B1=A1=E3=81=A7=E3=81=AA?= =?UTF-8?q?=E3=81=84=E3=81=AE=E3=81=A7findProductIdsOrder=E3=81=AE?= =?UTF-8?q?=E7=B5=90=E6=9E=9C=E3=81=8B=E3=82=89=E3=82=82=E5=A4=96=E3=81=99?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=E3=81=97=E3=81=A6=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/class/SC_Product.php | 2 +- tests/class/SC_Product/SC_Product_findProductIdsOrderTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/class/SC_Product.php b/data/class/SC_Product.php index 9424ca2576..1c2e0f60e3 100644 --- a/data/class/SC_Product.php +++ b/data/class/SC_Product.php @@ -87,7 +87,7 @@ public function findProductIdsOrder(&$objQuery, $arrVal = array()) $objQuery->setOrder("($sub_sql) $o_order, product_id"); } - $arrReturn = $objQuery->getCol('alldtl.product_id', $table, '', $arrVal); + $arrReturn = $objQuery->getCol('alldtl.product_id', $table, 'alldtl.del_flg = 0', $arrVal); return $arrReturn; } diff --git a/tests/class/SC_Product/SC_Product_findProductIdsOrderTest.php b/tests/class/SC_Product/SC_Product_findProductIdsOrderTest.php index 05af1f994b..3df9082319 100644 --- a/tests/class/SC_Product/SC_Product_findProductIdsOrderTest.php +++ b/tests/class/SC_Product/SC_Product_findProductIdsOrderTest.php @@ -48,7 +48,7 @@ public function testFindProductIdsOrder_arrOrderDataの設定による並び順( { // setProductsOrderを行う $this->objProducts->setProductsOrder('product_id'); - $this->expected = array('1001', '1002','2001'); + $this->expected = array('1001', '1002'); $this->actual = $this->objProducts->findProductIdsOrder($this->objQuery); From 9be6bd5678d3fa199ea0c94578f1a8da4371225f Mon Sep 17 00:00:00 2001 From: "SHUTTA, Takafumi" <> Date: Mon, 22 Apr 2019 03:56:35 +0900 Subject: [PATCH 3/3] =?UTF-8?q?commit:7b14ebe=20=E3=81=AB=E8=BF=BD?= =?UTF-8?q?=E5=BE=93=E3=81=97=E3=81=A6=E4=BB=96=E3=81=AEfindProductIdsOrde?= =?UTF-8?q?r=E5=91=A8=E3=82=8A=E3=81=AE=E3=83=86=E3=82=B9=E3=83=88?= =?UTF-8?q?=E3=81=AE=E6=9C=9F=E5=BE=85=E5=80=A4=E3=82=82=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/class/SC_Product/SC_Product_findProductIdsOrderTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/class/SC_Product/SC_Product_findProductIdsOrderTest.php b/tests/class/SC_Product/SC_Product_findProductIdsOrderTest.php index 3df9082319..a21b6d48bf 100644 --- a/tests/class/SC_Product/SC_Product_findProductIdsOrderTest.php +++ b/tests/class/SC_Product/SC_Product_findProductIdsOrderTest.php @@ -26,7 +26,7 @@ public function testFindProductIdsOrder_商品ID降順() { // 商品ID降順で商品IDを取得する $this->objQuery->setOrder('product_id DESC'); - $this->expected = array('2001','1002', '1001'); + $this->expected = array('1002', '1001'); $this->actual = $this->objProducts->findProductIdsOrder($this->objQuery); @@ -37,7 +37,7 @@ public function testFindProductIdsOrder_商品名昇順() { // 商品名昇順で商品IDを取得する $this->objQuery->setOrder('product_id ASC'); - $this->expected = array('1001', '1002','2001'); + $this->expected = array('1001', '1002'); $this->actual = $this->objProducts->findProductIdsOrder($this->objQuery);