|
@@ -689,6 +689,7 @@ class merchantControl extends SystemControl
|
|
{
|
|
{
|
|
$model_refill_order = Model('refill_order');
|
|
$model_refill_order = Model('refill_order');
|
|
$condition['refill_order.inner_status'] = 0;
|
|
$condition['refill_order.inner_status'] = 0;
|
|
|
|
+
|
|
$condition['refill_order.order_time'] = ['time', [strtotime(date("Y-m-d")), strtotime(date("Y-m-d"))]];
|
|
$condition['refill_order.order_time'] = ['time', [strtotime(date("Y-m-d")), strtotime(date("Y-m-d"))]];
|
|
if($_GET['order_state'] == ORDER_STATE_SEND) {
|
|
if($_GET['order_state'] == ORDER_STATE_SEND) {
|
|
unset($condition['refill_order.order_time']);
|
|
unset($condition['refill_order.order_time']);
|
|
@@ -713,7 +714,8 @@ class merchantControl extends SystemControl
|
|
$condition['vr_order.store_id'] = $_GET['store_id'];
|
|
$condition['vr_order.store_id'] = $_GET['store_id'];
|
|
unset($condition['refill_order.order_time']);
|
|
unset($condition['refill_order.order_time']);
|
|
}
|
|
}
|
|
- if (!empty($_GET['card_type'])) {
|
|
|
|
|
|
+ if (!empty($_GET['card_type']))
|
|
|
|
+ {
|
|
if(in_array($_GET['card_type'] , ['1' , '2' , '4' , '5' , '6'])) {
|
|
if(in_array($_GET['card_type'] , ['1' , '2' , '4' , '5' , '6'])) {
|
|
$condition['refill_order.card_type'] = $_GET['card_type'];
|
|
$condition['refill_order.card_type'] = $_GET['card_type'];
|
|
}
|
|
}
|
|
@@ -737,14 +739,16 @@ class merchantControl extends SystemControl
|
|
}
|
|
}
|
|
|
|
|
|
$start_unixtime = strtotime($_GET['query_start_time']);
|
|
$start_unixtime = strtotime($_GET['query_start_time']);
|
|
- $end_unixtime = strtotime($_GET['query_end_time']);
|
|
|
|
-
|
|
|
|
- if ($start_unixtime >0 && $end_unixtime >0) {
|
|
|
|
|
|
+ $end_unixtime = strtotime($_GET['query_end_time']);
|
|
|
|
+ if ($start_unixtime > 0 && $end_unixtime > 0) {
|
|
$condition['refill_order.order_time'] = ['time', [$start_unixtime, $end_unixtime]];
|
|
$condition['refill_order.order_time'] = ['time', [$start_unixtime, $end_unixtime]];
|
|
}
|
|
}
|
|
- if (in_array($_GET['order_state'], ['0', '10', '20', '30', '40'])) {
|
|
|
|
|
|
+
|
|
|
|
+ if (in_array($_GET['order_state'], ['0', '10', '20', '30', '40']))
|
|
|
|
+ {
|
|
$condition['vr_order.order_state'] = $_GET['order_state'];
|
|
$condition['vr_order.order_state'] = $_GET['order_state'];
|
|
- if($_GET['order_state'] == ORDER_STATE_SEND) {
|
|
|
|
|
|
+ if($_GET['order_state'] == ORDER_STATE_SEND)
|
|
|
|
+ {
|
|
if($_GET['time'] == 1){
|
|
if($_GET['time'] == 1){
|
|
$condition['refill_order.order_time'] = ['between', [(time() - 3600) , (time() - 1800)]];
|
|
$condition['refill_order.order_time'] = ['between', [(time() - 3600) , (time() - 1800)]];
|
|
}
|
|
}
|
|
@@ -765,7 +769,8 @@ class merchantControl extends SystemControl
|
|
->field('count(*) as order_count ,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();
|
|
->where($condition)->select();
|
|
$count = $this->refill_stat($condition);
|
|
$count = $this->refill_stat($condition);
|
|
- foreach ($order_list as $order_id => $order_info) {
|
|
|
|
|
|
+ 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]['card_type_text'] = $this->scard_type($order_info['card_type']);
|
|
$order_list[$order_id]['mch_name'] = $merchants[$order_info['mchid']]['company_name'];
|
|
$order_list[$order_id]['mch_name'] = $merchants[$order_info['mchid']]['company_name'];
|
|
if($order_info['notify_time'] > 0)
|
|
if($order_info['notify_time'] > 0)
|