|
@@ -571,7 +571,6 @@ class merchantControl extends SystemControl
|
|
|
$start_unixtime = $if_start_time ? strtotime($_GET['query_start_time']) : null;
|
|
|
$end_unixtime = $if_end_time ? strtotime($_GET['query_end_time']) : null;
|
|
|
if ($start_unixtime || $end_unixtime) {
|
|
|
- $condition['refill_order.order_time'] = array('time', array($start_unixtime, $end_unixtime));
|
|
|
$condition['refill_order.order_time'] = ['time', [$start_unixtime, $end_unixtime]];
|
|
|
}
|
|
|
$merchant_list = Model('')->table('merchant')->select();
|
|
@@ -582,9 +581,9 @@ class merchantControl extends SystemControl
|
|
|
|
|
|
$stat = Model('')->table('refill_order,vr_order')->join('inner')
|
|
|
->on('refill_order.order_id=vr_order.order_id')
|
|
|
- ->field('sum(refill_amount) as refill_amounts, sum(channel_amount) as channel_amounts, sum(mch_amount) as mch_amounts')
|
|
|
+ ->field('count(*) as order_count ,sum(refill_amount) as refill_amounts, sum(channel_amount) as channel_amounts, sum(mch_amount) as mch_amounts')
|
|
|
->where($condition)->select();
|
|
|
-
|
|
|
+ $half_count = $hour_count = 0;
|
|
|
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'];
|
|
@@ -597,9 +596,18 @@ class merchantControl extends SystemControl
|
|
|
{
|
|
|
$order_list[$order_id]['diff_time_text'] = $this->elapse_time(time() - $order_info['order_time']);
|
|
|
$order_list[$order_id]['diff_time'] = time() - $order_info['order_time'];
|
|
|
+ if($order_info['order_state'] == ORDER_STATE_SEND) {
|
|
|
+ if($order_list[$order_id]['diff_time'] > 1800 && $order_list[$order_id]['diff_time'] < 3600) {
|
|
|
+ $half_count++;
|
|
|
+ }
|
|
|
+ if($order_list[$order_id]['diff_time'] > 3600) {
|
|
|
+ $hour_count++;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
Tpl::output('stat', $stat[0]);
|
|
|
+ Tpl::output('count', ['half_count' => $half_count , 'hour_count' => $hour_count]);
|
|
|
Tpl::output('order_list', $order_list);
|
|
|
Tpl::output('show_page', $model_refill_order->showpage());
|
|
|
Tpl::showpage('refill.order.index');
|