|
@@ -280,10 +280,18 @@ class ordersendlistControl extends SystemControl
|
|
|
{
|
|
|
$base_cond['refill_order.mch_order'] = ['in', $buyback_mch_orders];
|
|
|
}
|
|
|
- else if (in_array($_GET['order_state'], ['0', '30', '40']))
|
|
|
+ else if (in_array($_GET['order_state'], ['30', '40']))
|
|
|
{
|
|
|
$base_cond['vr_order.order_state'] = intval($_GET['order_state']);
|
|
|
}
|
|
|
+ else if ($_GET['order_state'] === '0')
|
|
|
+ {
|
|
|
+ $base_cond['vr_order.order_state'] = intval($_GET['order_state']);
|
|
|
+
|
|
|
+ if (!empty($buyback_mch_orders)) {
|
|
|
+ $base_cond['refill_order.mch_order'] = ['not in', $buyback_mch_orders];
|
|
|
+ }
|
|
|
+ }
|
|
|
else if (empty($order_state))
|
|
|
{ //没选择订单状态,默认只显示充值中和已取消(未返销)
|
|
|
$base_cond['vr_order.order_state'] = ['in', [ORDER_STATE_CANCEL, ORDER_STATE_SEND]];
|
|
@@ -304,15 +312,16 @@ class ordersendlistControl extends SystemControl
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- $cur_time = time();
|
|
|
- $order_by = 'refill_order.order_time desc';
|
|
|
- $order_list = Model('')->table('refill_order,vr_order,merchant')
|
|
|
- ->join('inner,inner')
|
|
|
- ->on('refill_order.order_id=vr_order.order_id,refill_order.mchid=merchant.mchid')
|
|
|
- ->field("refill_order.*,vr_order.order_state,({$cur_time} - refill_order.order_time - merchant.time_out) as mtime_out")
|
|
|
- ->where($base_cond)
|
|
|
- ->order($order_by)
|
|
|
- ->select();
|
|
|
+// $order_by = 'refill_order.order_time desc';
|
|
|
+// $order_list = Model('')->table('refill_order,vr_order,merchant')
|
|
|
+// ->join('inner,inner')
|
|
|
+// ->on('refill_order.order_id=vr_order.order_id,refill_order.mchid=merchant.mchid')
|
|
|
+// ->field("refill_order.*,vr_order.order_state,({$cur_time} - refill_order.order_time - merchant.time_out) as mtime_out")
|
|
|
+// ->where($base_cond)
|
|
|
+// ->order($order_by)
|
|
|
+// ->select();
|
|
|
+ $order_list = $model_refill_order->getOrderMonitorTransfer($base_cond, 200, 5000,
|
|
|
+ "refill_order.*,vr_order.order_state,({$cur_time} - refill_order.order_time - merchant.time_out) as mtime_out");
|
|
|
|
|
|
$merchant_list = $merchants_getter($all_mchids);
|
|
|
if(!empty($order_list))
|