Ignore:
Timestamp:
2010/11/09 18:00:25 (16 years ago)
Author:
nanasess
bzr:base-revision:
[email protected]
bzr:committer:
Kentaro Ohkouchi <[email protected]>
bzr:file-ids:

data/Smarty/templates/admin/system/editdb.tpl 19117@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fcamp%2Fcamp-2_5-D%2Fdata%2FSmarty%2Ftemplates%2Fadmin%2Fsystem%2Feditdb.tpl
data/Smarty/templates/admin/system/subnavi.tpl 15732@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fadmin%2Fsystem%2Fsubnavi.tpl
data/class/SC_Initial.php 16506@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2FSC_Initial.php
data/class/SC_Product.php 18277@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fcomu-ver2%2Fdata%2Fclass%2FSC_Product.php
data/class/SC_Query.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2FSC_Query.php
data/class/helper/SC_Helper_DB.php 15176@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fhelper%2FSC_Helper_DB.php
data/class/helper/SC_Helper_Session.php 15277@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fhelper%2FSC_Helper_Session.php
data/class/pages/LC_Page.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2FLC_Page.php
data/class/pages/admin/order/LC_Page_Admin_Order_ProductSelect.php 17293@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fcomu-ver2%2Fdata%2Fclass%2Fpages%2Fadmin%2Forder%2FLC_Page_Admin_Order_ProductSelect.php
data/class/pages/admin/system/LC_Page_Admin_System_Editdb.php 19117@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fcamp%2Fcamp-2_5-D%2Fdata%2Fclass%2Fpages%2Fadmin%2Fsystem%2FLC_Page_Admin_System_Editdb.php
data/class/pages/products/LC_Page_Products_List.php 15154@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fproducts%2FLC_Page_Products_List.php
data/class_extends/page_extends/admin/system/LC_Page_Admin_System_Editdb_Ex.php 19117@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fcamp%2Fcamp-2_5-D%2Fdata%2Fclass_extends%2Fpage_extends%2Fadmin%2Fsystem%2FLC_Page_Admin_System_Editdb_Ex.php
html/admin/system/editdb.php 19180@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fcamp%2Fcamp-2_5-D%2Fhtml%2Fadmin%2Fsystem%2Feditdb.php
html/install/sql/column_comment.sql 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Finstall%2Fsql%2Fcolumn_comment.sql
html/install/sql/create_table_mysql.sql 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Finstall%2Fsql%2Fcreate_table_mysql.sql
html/install/sql/create_table_pgsql.sql 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Finstall%2Fsql%2Fcreate_table_pgsql.sql
html/install/sql/drop_table.sql 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Finstall%2Fsql%2Fdrop_table.sql
html/install/sql/insert_data.sql 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Finstall%2Fsql%2Finsert_data.sql
bzr:mapping-version:
v4
bzr:repository-uuid:
1e3b908f-19a9-db11-a64c-001125224ba8
bzr:revision-id:
[email protected]
bzr:revno:
2392
bzr:revprop:branch-nick:
branches/version-2_5-dev
bzr:root:
branches/version-2_5-dev
bzr:timestamp:
2010-11-09 18:00:16.530999899 +0900
bzr:user-agent:
bzr2.2.0+bzr-svn1.0.3
svn:original-date:
2010-11-09T09:00:16.531000Z
Message:

source:branches/camp/camp-2_5-D のマージ

  • sfCategory_Countの高速化(規格のデータベースを木構造に #781)
  • IN句が長くなり正常に動かない問題を修正(規格のデータベースを木構造に #781)
  • インデックス管理機能(#848)
Location:
branches/version-2_5-dev/data/class/pages/admin
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/class/pages/admin/order/LC_Page_Admin_Order_ProductSelect.php

    r19661 r19662  
    7171        $objSess = new SC_Session(); 
    7272        $objDb = new SC_Helper_DB_Ex(); 
    73         $objQuery = new SC_Query(); 
    7473 
    7574        // 認証可否の判定 
    … …  
    9190            $this->lfConvertParam(); 
    9291 
    93             $where = "del_flg = 0"; 
     92            $where = "alldtl.del_flg = 0"; 
    9493            $arrval = array(); 
    9594 
    … …  
    108107                    list($tmp_where, $tmp_arrval) = $objDb->sfGetCatWhere($val); 
    109108                    if($tmp_where != "") { 
    110                         $where.= " AND product_id IN (SELECT product_id FROM dtb_product_categories WHERE " . $tmp_where . ")"; 
     109                        $where.= " AND alldtl.product_id IN (SELECT product_id FROM dtb_product_categories WHERE " . $tmp_where . ")"; 
    111110                        $arrval = array_merge((array)$arrval, (array)$tmp_arrval); 
    112111                    } 
    113112                    break; 
    114113                case 'search_product_code': 
    115                     $where .= " AND product_id IN (SELECT product_id FROM dtb_products_class WHERE product_code LIKE ? GROUP BY product_id)"; 
     114                    $where .= " AND alldtl.product_id IN (SELECT product_id FROM dtb_products_class WHERE product_code LIKE ? GROUP BY product_id)"; 
    116115                    $arrval[] = "$val%"; 
    117116                    break; 
    … …  
    121120            } 
    122121 
     122            // 検索結果対象となる商品の数を取得 
     123            $objQuery =& SC_Query::getSingletonInstance(); 
     124            $objQuery->setWhere($where); 
    123125            $objProduct = new SC_Product(); 
    124             $productIds = $objProduct->findProductIds($objQuery, $arrval); 
    125  
    126             // 行数の取得 
    127             $linemax = count($productIds); 
    128             $this->tpl_linemax = $linemax; 
     126            $linemax = $objProduct->findProductCount($objQuery, $arrval); 
     127            $this->tpl_linemax = $linemax;   // 何件が該当しました。表示用 
    129128 
    130129            // ページ送りの処理 
    … …  
    141140            $startno = $objNavi->start_row; 
    142141 
     142            $objProduct = new SC_Product(); 
     143            $objQuery =& SC_Query::getSingletonInstance(); 
     144            $objQuery->setWhere($where); 
     145 
    143146            // 取得範囲の指定(開始行番号、行数のセット) 
    144147            $objQuery->setLimitOffset($page_max, $startno); 
    … …  
    147150 
    148151            // 検索結果の取得 
    149             $this->arrProducts = $objProduct->lists($objQuery, $arrval); 
    150             $objProduct->setProductsClassByProductIds($productIds); 
     152            $arrProduct_id = $objProduct->findProductIdsOrder($objQuery, $arrval); 
     153 
     154            $where = ""; 
     155            if (is_array($arrProduct_id) && !empty($arrProduct_id)) { 
     156                $where = 'product_id IN (' . implode(',', $arrProduct_id) . ')'; 
     157            } else { 
     158                // 一致させない 
     159                $where = '0<>0'; 
     160            } 
     161            $objQuery =& SC_Query::getSingletonInstance(); 
     162            $objQuery->setWhere($where); 
     163            $arrProducts = $objProduct->lists($objQuery, $arrProduct_id); 
     164 
     165            //取得している並び順で並び替え 
     166            $arrProducts2 = array(); 
     167            foreach($arrProducts as $item) { 
     168                $arrProducts2[ $item['product_id'] ] = $item; 
     169            } 
     170            $this->arrProducts = array(); 
     171            foreach($arrProduct_id as $product_id) { 
     172                $this->arrProducts[] = $arrProducts2[$product_id]; 
     173            } 
     174 
     175            $objProduct->setProductsClassByProductIds($arrProduct_id); 
    151176            $objJson = new Services_JSON(); 
    152177            $this->tpl_javascript .= 'productsClassCategories = ' . $objJson->encode($objProduct->classCategories) . '; '; 
Note: See TracChangeset for help on using the changeset viewer.