|
@@ -14,6 +14,7 @@ class merchant_orderControl extends mbMerchantControl
|
|
|
|
|
|
$cond['mchid'] = $this->mchid();
|
|
|
$cond['inner_status'] = 0;
|
|
|
+ $fSingle = false;
|
|
|
if (!empty($_GET['card_type'])) {
|
|
|
if(in_array($_GET['card_type'] , ['1' , '2' , '4' , '5' , '6'])) {
|
|
|
$cond['refill_order.card_type'] = $_GET['card_type'];
|
|
@@ -26,38 +27,45 @@ class merchant_orderControl extends mbMerchantControl
|
|
|
}
|
|
|
}
|
|
|
if (!empty($_GET['card_no'])) {
|
|
|
+ $fSingle = true;
|
|
|
$cond['refill_order.card_no'] = $_GET['card_no'];
|
|
|
}
|
|
|
if (!empty($_GET['refill_amount'])) {
|
|
|
$cond['refill_order.refill_amount'] = $_GET['refill_amount'];
|
|
|
}
|
|
|
if (!empty($_GET['mch_order'])) {
|
|
|
+ $fSingle = true;
|
|
|
$cond['refill_order.mch_order'] = $_GET['mch_order'];
|
|
|
}
|
|
|
if (!empty($_GET['order_sn'])) {
|
|
|
+ $fSingle = true;
|
|
|
$cond['refill_order.order_sn'] = $_GET['order_sn'];
|
|
|
}
|
|
|
if (!empty($_GET['quality'])) {
|
|
|
$cond['refill_order.quality'] = $_GET['quality'];
|
|
|
}
|
|
|
+ $start = time() - 3600;
|
|
|
+ $cond['refill_order.order_time'] = ['egt', $start];
|
|
|
|
|
|
- $start_unixtime = intval($_GET['start_time']);
|
|
|
- $end_unixtime = intval($_GET['end_time']);
|
|
|
+ if($fSingle) {
|
|
|
+ $start_unixtime = intval($_GET['start_time']);
|
|
|
+ $end_unixtime = intval($_GET['end_time']);
|
|
|
|
|
|
- if ($start_unixtime > 0 && $end_unixtime > $start_unixtime) {
|
|
|
- $cond['refill_order.order_time'] = [['egt', $start_unixtime], ['lt', $end_unixtime], 'and'];
|
|
|
- } elseif ($start_unixtime > 0) {
|
|
|
- $cond['refill_order.order_time'] = ['egt', $start_unixtime];
|
|
|
- } elseif ($end_unixtime > 0) {
|
|
|
- $cond['refill_order.order_time'] = ['lt', $end_unixtime];
|
|
|
- } else {
|
|
|
- $start = strtotime(date('Y-m-d', time()));
|
|
|
- $cond['refill_order.order_time'] = ['egt', $start];
|
|
|
- }
|
|
|
- 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 ($start_unixtime > 0 && $end_unixtime > $start_unixtime) {
|
|
|
+ $cond['refill_order.order_time'] = [['egt', $start_unixtime], ['lt', $end_unixtime], 'and'];
|
|
|
+ } elseif ($start_unixtime > 0) {
|
|
|
+ $cond['refill_order.order_time'] = ['egt', $start_unixtime];
|
|
|
+ } elseif ($end_unixtime > 0) {
|
|
|
+ $cond['refill_order.order_time'] = ['lt', $end_unixtime];
|
|
|
+ } else {
|
|
|
+ $start = time() - 3600;
|
|
|
+ $cond['refill_order.order_time'] = ['egt', $start];
|
|
|
+ }
|
|
|
+ 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)];
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|