|
@@ -17,7 +17,8 @@ class ordersendlistControl extends SystemControl
|
|
|
$condition['refill_order.inner_status'] = 0;
|
|
|
$condition['vr_order.order_state'] = ORDER_STATE_SEND;
|
|
|
|
|
|
- $condition['refill_order.order_time'] = ['lt', (time() - 180)];
|
|
|
+ $time = time();
|
|
|
+ $condition['refill_order.order_time'] = ['exp', "refill_order.order_time < ({$time} - merchant.time_out)"];
|
|
|
if (!empty($_GET['mchid'])) {
|
|
|
$condition['refill_order.mchid'] = $_GET['mchid'];
|
|
|
}
|
|
@@ -83,7 +84,7 @@ class ordersendlistControl extends SystemControl
|
|
|
$condition['refill_order.quality'] = $_GET['quality'];
|
|
|
}
|
|
|
|
|
|
- $order_list = $model_refill_order->getMerchantOrderList($condition, 50, 'refill_order.*,vr_order.order_state', 'refill_order.order_time asc');
|
|
|
+ $order_list = $model_refill_order->getMerchantTimeOut($condition, 50, 'refill_order.*,vr_order.order_state', 'refill_order.order_time asc');
|
|
|
|
|
|
$stat = Model('')->table('refill_order,vr_order')->join('inner')
|
|
|
->on('refill_order.order_id=vr_order.order_id')
|
|
@@ -200,6 +201,7 @@ class ordersendlistControl extends SystemControl
|
|
|
|
|
|
public function orderFormat($order_list, $merchant_list): array
|
|
|
{
|
|
|
+ if(empty($order_list)) return [];
|
|
|
$merchants = [];
|
|
|
foreach ($merchant_list as $value) {
|
|
|
$merchants[$value['mchid']] = $value;
|