dever 3 éve
szülő
commit
936352cfa0
2 módosított fájl, 42 hozzáadás és 5 törlés
  1. 36 2
      app/cash/database/order.php
  2. 6 3
      app/cash/lib/Set.php

+ 36 - 2
app/cash/database/order.php

@@ -423,8 +423,6 @@ return array
                 'type_id' => 'yes',
                 'source_type' => 'yes',
                 'source_id' => 'yes',
-                //'source_type_or' => array('yes-source_type', 'or'),
-                //'source_id_or' => array('yes-source_id', 'or'),
                 'status' => array('yes', 'in'),
                 'state' => 1,
             ),
@@ -451,5 +449,41 @@ return array
             'page' => array(10, 'list'),
             'col' => '*',
         ),
+
+        'getAllNoPage' => array
+        (
+            # 匹配的正则或函数 选填项
+            'option' => array
+            (
+                'start' => array('yes-cdate', '>='),
+                'end' => array('yes-cdate', '<='),
+                'type' => 'yes',
+                'type_id' => 'yes',
+                'source_type' => 'yes',
+                'source_id' => 'yes',
+                'status' => array('yes', 'in'),
+                'state' => 1,
+            ),
+            'type' => 'all',
+            'col' => '*',
+        ),
+
+        'getAllByStoreNoPage' => array
+        (
+            # 匹配的正则或函数 选填项
+            'option' => array
+            (
+                'start' => array('yes-cdate', '>='),
+                'end' => array('yes-cdate', '<='),
+                'type' => array('yes-type', '=', 'and (( '),
+                'type_id' => array('yes-type_id', '=', 'and )'),
+                'source_type' => array('yes-source_type', '=', 'or ( '),
+                'source_id' => array('yes-source_id', '=', 'and )) '),
+                'status' => array('yes', 'in'),
+                'state' => 1,
+            ),
+            'type' => 'all',
+            'col' => '*',
+        ),
     ),
 );

+ 6 - 3
app/cash/lib/Set.php

@@ -355,19 +355,22 @@ class Set
         if ($type == 'shop') {
             $where['type'] = 1;
             $where['type_id'] = $id;
+            $m = 'getAllNoPage';
         } elseif ($type == 'factory') {
             $where['source_type'] = 3;
             $where['source_id'] = $id;
+            $m = 'getAllNoPage';
         } else {
             $where['type'] = 2;
             $where['type_id'] = $id;
-            //$where['source_type_or'] = 2;
-            //$where['source_id_or'] = $id;
+            $where['source_type'] = 2;
+            $where['source_id'] = $id;
+            $m = 'getAllByStoreNoPage';
         }
         $where['status'] = 2;
         $where['start'] = $info['start'];
         $where['end'] = $info['end'];
-        $data = Dever::db('cash/order')->getAll($where);
+        $data = Dever::db('cash/order')->$m($where);
 
         $stat_type = Dever::db('cash/shop')->config['config_type'];
         $other = Dever::db($type . '/info')->find($id);