Skip to content

Commit

Permalink
EC-CUBE#2644 (SC_DB_DBFactory::alldtlSQL から class_count を削除)
Browse files Browse the repository at this point in the history
  • Loading branch information
Seasoft authored and Seasoft committed Oct 27, 2014
1 parent 0708aea commit 7039615
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 19 deletions.
28 changes: 13 additions & 15 deletions data/class/db/SC_DB_DBFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,24 +267,22 @@ public function alldtlSQL($where_products_class = '')
,T4.stock_unlimited_max
,T4.point_rate
,T4.deliv_fee
,T4.class_count
,dtb_maker.name AS maker_name
FROM dtb_products
INNER JOIN (
SELECT product_id,
MIN(product_code) AS product_code_min,
MAX(product_code) AS product_code_max,
MIN(price01) AS price01_min,
MAX(price01) AS price01_max,
MIN(price02) AS price02_min,
MAX(price02) AS price02_max,
MIN(stock) AS stock_min,
MAX(stock) AS stock_max,
MIN(stock_unlimited) AS stock_unlimited_min,
MAX(stock_unlimited) AS stock_unlimited_max,
MAX(point_rate) AS point_rate,
MAX(deliv_fee) AS deliv_fee,
COUNT(*) as class_count
SELECT product_id
,MIN(product_code) AS product_code_min
,MAX(product_code) AS product_code_max
,MIN(price01) AS price01_min
,MAX(price01) AS price01_max
,MIN(price02) AS price02_min
,MAX(price02) AS price02_max
,MIN(stock) AS stock_min
,MAX(stock) AS stock_max
,MIN(stock_unlimited) AS stock_unlimited_min
,MAX(stock_unlimited) AS stock_unlimited_max
,MAX(point_rate) AS point_rate
,MAX(deliv_fee) AS deliv_fee
FROM dtb_products_class
WHERE del_flg = 0 $where_products_class
GROUP BY product_id
Expand Down
1 change: 0 additions & 1 deletion data/class/db/dbfactory/SC_DB_DBFactory_PGSQL.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,6 @@ public function alldtlSQL($where_products_class = '')
,(SELECT MAX(stock_unlimited) $sub_base) AS stock_unlimited_max
,(SELECT MAX(point_rate) $sub_base) AS point_rate
,(SELECT MAX(deliv_fee) $sub_base) AS deliv_fee
,(SELECT COUNT(*) $sub_base) AS class_count
FROM dtb_products
LEFT JOIN dtb_maker
ON dtb_products.maker_id = dtb_maker.maker_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ public function getCartList_商品を1つ追加した場合商品データを返
,'creator_id' => '1'
,'point_rate' => '0'
,'deliv_fee' => null
,'class_count' => '1'
,'maker_name' => null
,'stock' => '99'
,'stock_unlimited' => '0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ public function testGetDetailAndProductsClass_商品規格IDの商品情報と
,'create_date' => $arrRet[0]
,'point_rate' => '0'
,'deliv_fee' => null
,'class_count' => '1'
,'maker_name' => null
,'stock' => '99'
,'stock_unlimited' => '0'
Expand Down
1 change: 0 additions & 1 deletion tests/class/SC_Product/SC_Product_getDetailTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ public function testGetDetail_商品IDの詳細情報を返す()
,'create_date' => $arrRet[0]
,'point_rate' => '0'
,'deliv_fee' => null
,'class_count' => '1'
,'maker_name' => null
);

Expand Down

0 comments on commit 7039615

Please sign in to comment.