Sfoglia il codice sorgente

admin refill order manual search master db

xiaoyu 3 anni fa
parent
commit
ceff7cda6f
2 ha cambiato i file con 52 aggiunte e 52 eliminazioni
  1. 1 1
      admin/control/refill_order_manual.php
  2. 51 51
      data/model/refill_order.model.php

+ 1 - 1
admin/control/refill_order_manual.php

@@ -23,7 +23,7 @@ class refill_order_manualControl extends SystemControl
                 $merchants[$value['mchid']] = $value;
             }
 
-            $order_list = $model_refill_order->getMerchantOrderList($condition, 50, 'refill_order.*,vr_order.order_state', 'refill_order.order_time desc');
+            $order_list = $model_refill_order->getMerchantOrderList($condition, 50, 'refill_order.*,vr_order.order_state', 'refill_order.order_time desc','',true);
             foreach ($order_list as $order_id => $order_info) {
                 $order_list[$order_id]['card_type_text'] = $this->scard_type($order_info['card_type']);
                 $order_list[$order_id]['mch_name'] = $merchants[$order_info['mchid']]['company_name'];

+ 51 - 51
data/model/refill_order.model.php

@@ -1,51 +1,51 @@
-<?php
-
-use const mtopcard\PetroChinaCard;
-use const mtopcard\PhoneCard;
-use const mtopcard\SinopecCard;
-
-defined('InShopNC') or exit('Access Invalid!');
-
-
-class refill_orderModel extends Model
-{
-    public function getOrderInfo($condition = [], $fields = '*', $master = false, $lock = false)
-    {
-        $order_info = $this->table('refill_order')->field($fields)->where($condition)->order('')->master($master)->lock($lock)->find();
-        if (empty($order_info)) {
-            return [];
-        }
-        return $order_info;
-    }
-
-    public function add_refill($params)
-    {
-        return $this->table('refill_order')->insert($params);
-    }
-
-    public function edit($order_id,$data)
-    {
-        return $this->table('refill_order')->where(['order_id' => $order_id])->update($data);
-    }
-
-    public function getMerchantOrderList($condition, $pagesize = '', $field = '*', $order = 'refill_order.order_id desc', $limit = '')
-    {
-        $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)->select();
-        if (empty($list)) return [];
-        return $list;
-    }
-
-    public function getOrderStatsList($condition, $pagesize = '', $field = '*', $order = 'time_stamp desc', $limit = '')
-    {
-        $list = $this->table('refill_stats')->field($field)
-            ->where($condition)->page($pagesize)->order($order)->limit($limit)->select();
-        if (empty($list)) return [];
-        return $list;
-    }
-
-    public function first_item()
-    {
-        return $this->table('refill_order')->field('order_time')->where(['order_id' => ['gt',0]])->order('order_id asc')->find();
-    }
-}
+<?php
+
+use const mtopcard\PetroChinaCard;
+use const mtopcard\PhoneCard;
+use const mtopcard\SinopecCard;
+
+defined('InShopNC') or exit('Access Invalid!');
+
+
+class refill_orderModel extends Model
+{
+    public function getOrderInfo($condition = [], $fields = '*', $master = false, $lock = false)
+    {
+        $order_info = $this->table('refill_order')->field($fields)->where($condition)->order('')->master($master)->lock($lock)->find();
+        if (empty($order_info)) {
+            return [];
+        }
+        return $order_info;
+    }
+
+    public function add_refill($params)
+    {
+        return $this->table('refill_order')->insert($params);
+    }
+
+    public function edit($order_id,$data)
+    {
+        return $this->table('refill_order')->where(['order_id' => $order_id])->update($data);
+    }
+
+    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();
+        if (empty($list)) return [];
+        return $list;
+    }
+
+    public function getOrderStatsList($condition, $pagesize = '', $field = '*', $order = 'time_stamp desc', $limit = '')
+    {
+        $list = $this->table('refill_stats')->field($field)
+            ->where($condition)->page($pagesize)->order($order)->limit($limit)->select();
+        if (empty($list)) return [];
+        return $list;
+    }
+
+    public function first_item()
+    {
+        return $this->table('refill_order')->field('order_time')->where(['order_id' => ['gt',0]])->order('order_id asc')->find();
+    }
+}