Ver código fonte

Merge branch 'master' of http://121.40.40.223:3000/wiipu/boniu

chenbo 5 anos atrás
pai
commit
434f9f5221
2 arquivos alterados com 17 adições e 17 exclusões
  1. 0 17
      lib/table/table.class.php
  2. 17 0
      lib/table/table_stock.class.php

+ 0 - 17
lib/table/table.class.php

@@ -70,23 +70,6 @@ abstract class Table {
         }
 	}
 
-    public function getStockCodeList($filter = array(), $count = 0, $page = 0, $pagesize = 0){
-
-        $where="where 1=1";
-        $sql = "select "."`stock_code`". "from ". $this->table_fullname ." $where order by ".$this->table_id." desc";
-        var_dump($sql);
-        $rs  = $this->pdo->sqlQuery($sql);
-        $r   = array();
-        if($rs){
-            foreach($rs as $key => $val){
-                $r[$key] = $this->dataToAttr($val);
-            }
-            return $r;
-        }else{
-            return $r;
-        }
-
-        }
 
     //获取列表(分页)
     //$count、$page和$pagesize都为0时,返回全部结果(适用于无需分页的情况)

+ 17 - 0
lib/table/table_stock.class.php

@@ -57,6 +57,23 @@ class Table_stock extends Table {
         return $this->pdo->sqlinsert($this->table_fullname, $param);
     }
 
+    public function getStockCodeList($filter = array(), $count = 0, $page = 0, $pagesize = 0){
+
+        $where="where 1=1";
+        $sql = "select "."`stock_code`". "from ". $this->table_fullname ." $where order by ".$this->table_id." desc";
+        $rs  = $this->pdo->sqlQuery($sql);
+        $r   = array();
+        if($rs){
+            foreach($rs as $key => $val){
+                $r[$key] = $this->dataToAttr($val);
+            }
+            return $r;
+        }else{
+            return $r;
+        }
+
+    }
+
     public function addCodeAndName($attr){
         $param = array (
             'stock_code'            => array('string', $attr['code']),