Jelajahi Sumber

admin refill detail db master query

xiaoyu 3 tahun lalu
induk
melakukan
5876b4c5ee
2 mengubah file dengan 4 tambahan dan 4 penghapusan
  1. 2 2
      admin/control/refill_detail.php
  2. 2 2
      data/model/refill_detail.model.php

+ 2 - 2
admin/control/refill_detail.php

@@ -51,7 +51,7 @@ class refill_detailControl extends SystemControl
             $this->RefillDetailExport($condition,$merchants);
             exit;
         }else{
-            $list = $mod->getRefillDetailList($condition,30);
+            $list = $mod->getRefillDetailList($condition,30,'*','order_time desc', '', true);
             $list = $this->DataFormat($list,$merchants);
         }
 
@@ -84,7 +84,7 @@ class refill_detailControl extends SystemControl
         $result = [];
         while (true) {
             $start = $i * 1000;
-            $list = Model('')->table('refill_detail')->where($condition)->order('order_time desc')->limit("{$start},1000")->select();
+            $list = Model('')->table('refill_detail')->where($condition)->order('order_time desc')->limit("{$start},1000")->master(true)->select();
 
             if (empty($list)) {
                 break;

+ 2 - 2
data/model/refill_detail.model.php

@@ -9,9 +9,9 @@ class refill_detailModel extends Model
         parent::__construct('refill_detail');
     }
 
-    public function getRefillDetailList($condition, $pagesize = '', $field = '*', $order = 'order_time desc', $limit = '')
+    public function getRefillDetailList($condition, $pagesize = '', $field = '*', $order = 'order_time desc', $limit = '', $master = false)
     {
-        $list = $this->field($field)->where($condition)->page($pagesize)->order($order)->limit($limit)->select();
+        $list = $this->field($field)->where($condition)->page($pagesize)->order($order)->limit($limit)->master(true)->select();
         if (empty($list)) return [];
         return $list;
     }