1234567891011121314151617181920212223242526272829303132333435 |
- <?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)
- {
- $order_info = $this->table('refill_order')->field($fields)->where($condition)->master($master)->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('left')->on('refill_order.order_id=vr_order.order_id')->page($pagesize)->order($order)->limit($limit)->select();
- if (empty($list)) return [];
- return $list;
- }
- }
|