stanley-king 3 tahun lalu
induk
melakukan
9d92d2e2cd

+ 2 - 2
admin/control/ordersendlist.php

@@ -125,7 +125,7 @@ class ordersendlistControl extends SystemControl
 
         $fields = 'refill_order.*,vr_order.order_state';
         $order_by = "( {$cur_time} - refill_order.commit_time ) desc";
-        $order_list = $model_refill_order->getMerchantTimeOut($orders_cond, 200, $fields, $order_by);
+        $order_list = $model_refill_order->getMerchantTimeOut($orders_cond, 200, 10000,$fields, $order_by);
         $order_stat = Model('')->table('refill_order,vr_order,merchant')
             ->join('inner,inner')
             ->on('refill_order.order_id=vr_order.order_id,refill_order.mchid=merchant.mchid')
@@ -217,7 +217,7 @@ class ordersendlistControl extends SystemControl
         //耗时
         $fields = "refill_order.*,vr_order.order_state";
         $order_by = "({$cur_time} - refill_order.commit_time) desc";
-        $order_list = $model_refill_order->getMerchantTimeOut($orders_cond, 200, $fields, $order_by);
+        $order_list = $model_refill_order->getMerchantTimeOut($orders_cond, 200, 10000,$fields, $order_by);
         $order_stat = Model('')->table('refill_order,vr_order,merchant')
             ->join('inner,inner')
             ->on('refill_order.order_id=vr_order.order_id,refill_order.mchid=merchant.mchid')

+ 4 - 2
core/framework/function/core.php

@@ -1591,8 +1591,10 @@ function initpage($page,$curpage,$total_num = false)
  * @param mixed $arg 参数
  * @return mixed
  */
-function pagecmd($cmd ='', $arg = ''){
-	if (!class_exists('page'))	import('page');
+function pagecmd($cmd ='', $arg = '')
+{
+    if (!class_exists('page')) import('page');
+
 	static $page;
 	if ($page == null){
 		$page = new Page();

+ 19 - 17
core/framework/libraries/model.php

@@ -204,23 +204,25 @@ class Model
 				$args[0] = 10;
 			}
 
-			if (is_numeric($args[1]) && $args[1] > 0){
-			    //page(2,30)形式,传入了每页显示数据和总记录数
-			    if ($args[0] > 0){
-			        $this->options[strtolower($method)] =   $args[0];
-			        pagecmd('setEachNum',	$args[0]);
-			        $this->unoptions = false;
-			        pagecmd('setTotalNum',	$args[1]);
-			        return $this;
-			    }else{
-			        $args[0] = 10;
-			    }
-			}
-			$this->options[strtolower($method)] =   $args[0];
-			pagecmd('setEachNum',	$args[0]);
-			$this->unoptions = false;
-			pagecmd('setTotalNum',	$this->get_field('COUNT(*) AS nc_count'));
-        	return $this;
+            if (is_numeric($args[1]) && $args[1] > 0)
+            {
+                //page(2,30)形式,传入了每页显示数据和总记录数
+                if ($args[0] > 0) {
+                    $this->options[strtolower($method)] = $args[0];
+                    pagecmd('setEachNum', $args[0]);
+                    $this->unoptions = false;
+                    pagecmd('setTotalNum', $args[1]);
+                    return $this;
+                } else {
+                    $args[0] = 10;
+                }
+            }
+
+            $this->options[strtolower($method)] = $args[0];
+            pagecmd('setEachNum', $args[0]);
+            $this->unoptions = false;
+            pagecmd('setTotalNum', $this->get_field('COUNT(*) AS nc_count'));
+            return $this;
         }
         elseif(in_array(strtolower($method), ['min','max','count','sum','avg'],true))
         {

+ 12 - 4
data/model/refill_order.model.php

@@ -30,20 +30,28 @@ class refill_orderModel extends Model
 
     public function getMerchantOrderList($condition, $pagesize = '', $field = '*', $order = 'refill_order.order_id desc', $limit = '', $master = false)
     {
-        $list = $this->table('refill_order,vr_order')->field($field)
-            ->where($condition)->join('inner')->on('refill_order.order_id=vr_order.order_id')->page($pagesize)->order($order)->limit($limit)->master($master)->select();
+        $list = $this->table('refill_order,vr_order')
+            ->field($field)
+            ->where($condition)->join('inner')->on('refill_order.order_id=vr_order.order_id')
+            ->page($pagesize)
+            ->order($order)
+            ->limit($limit)
+            ->master($master)
+            ->select();
+
         if (empty($list)) return [];
         return $list;
     }
 
-    public function getMerchantTimeOut($condition, $pagesize = '', $field = '*', $order = 'refill_order.order_id desc', $limit = '', $master = false)
+    public function getMerchantTimeOut($condition, $pagesize = '', $count = -1, $field = '*', $order = 'refill_order.order_id desc', $limit = '', $master = false)
     {
         $list = $this->table('refill_order,vr_order,merchant')
             ->join('inner,inner')
             ->on('refill_order.order_id=vr_order.order_id,refill_order.mchid=merchant.mchid')
             ->where($condition)
             ->field($field)
-            ->page($pagesize)->order($order)->limit($limit)->master($master)->select();
+            ->page($pagesize,$count)->order($order)->limit($limit)->master($master)->select();
+
         if (empty($list)) return [];
         return $list;
     }

+ 2 - 3
shop/control/search.php

@@ -7,9 +7,8 @@
 
 defined('InShopNC') or exit('Access Invalid!');
 
-class searchControl extends BaseHomeControl {
-
-
+class searchControl extends BaseHomeControl
+{
     //每页显示商品数
     const PAGESIZE = 24;