|
@@ -17,12 +17,22 @@ class merchant_orderControl extends mbMerchantControl
|
|
|
if (!empty($_GET['card_type'])) {
|
|
|
$cond['refill_order.card_type'] = $_GET['card_type'];
|
|
|
}
|
|
|
+ if (!empty($_GET['refill_amount'])) {
|
|
|
+ $cond['refill_order.refill_amount'] = $_GET['refill_amount'];
|
|
|
+ }
|
|
|
+ if (!empty($_GET['mch_order'])) {
|
|
|
+ $cond['refill_order.mch_order'] = $_GET['mch_order'];
|
|
|
+ }
|
|
|
+ if (in_array($_GET['order_state'], array('0', '30', '40'))) {
|
|
|
+ $cond['vr_order.order_state'] = $_GET['order_state'];
|
|
|
+ if($_GET['order_state'] == 30 && $_GET['time'] == 1){
|
|
|
+ $cond['refill_order.order_time'] = ['lt', (time() - 3600)];
|
|
|
+ }
|
|
|
+ }
|
|
|
if ($_GET['start_time'] > 0 && $_GET['end_time'] > 0) {
|
|
|
$cond['refill_order.order_time'] = ['between', [$_GET['start_time'], $_GET['end_time']]];
|
|
|
}
|
|
|
- $fields = 'refill_order.order_id,refill_order.order_sn,refill_order.mchid,refill_order.card_no,
|
|
|
- refill_order.mch_order,refill_order.card_type,refill_order.order_time,refill_order.notify_time,
|
|
|
- refill_order.refill_amount,refill_order.mch_amount,vr_order.order_state,refill_order.channel_name,refill_order.ch_trade_no,refill_order.official_sn';
|
|
|
+ $fields = 'refill_order.*,vr_order.order_state';
|
|
|
$order_list = $model_vr_order->getMerchantOrderList($cond, $this->page, $fields, 'refill_order.order_id desc');
|
|
|
$order_list = $this->merchant_order_format($order_list);
|
|
|
$result['data'] = $order_list;
|