|
@@ -31,7 +31,7 @@ class merchantControl extends SystemControl
|
|
|
Tpl::output('merchant_name', $_GET['merchant_name']);
|
|
|
}
|
|
|
|
|
|
- $merchant_list = $model_merchant->getMerchantList($condition, 25, 'mchid desc');
|
|
|
+ $merchant_list = $model_merchant->getMerchantList($condition, 25, 'available_predeposit desc');
|
|
|
|
|
|
$merchant_state_text = ['使用中', '已禁用'];
|
|
|
Tpl::output('merchant_state_text', $merchant_state_text);
|
|
@@ -776,9 +776,15 @@ class merchantControl extends SystemControl
|
|
|
|
|
|
public function OrderQueryOp()
|
|
|
{
|
|
|
+<<<<<<< HEAD
|
|
|
$model_vr_order = Model('vr_order');
|
|
|
$condition['order_state'] = ORDER_STATE_SEND;
|
|
|
$orders = $model_vr_order->getOrderList($condition);
|
|
|
+=======
|
|
|
+ $model_refill_order = Model('vr_order');
|
|
|
+ $condition['order_state'] = ORDER_STATE_SEND;
|
|
|
+ $orders = $model_refill_order->getOrderList($condition);
|
|
|
+>>>>>>> a6ba406cb16e9d0e3722be24363c0a95891f5fd5
|
|
|
if(!empty($orders)) {
|
|
|
foreach ($orders as $order) {
|
|
|
$order_id = $order['order_id'];
|
|
@@ -788,6 +794,7 @@ class merchantControl extends SystemControl
|
|
|
showMessage('操作成功', 'index.php?act=merchant&op=refill_order');
|
|
|
}
|
|
|
|
|
|
+<<<<<<< HEAD
|
|
|
public function mch_notifyOp()
|
|
|
{
|
|
|
$model_refill_order = Model('refill_order');
|
|
@@ -813,6 +820,12 @@ class merchantControl extends SystemControl
|
|
|
$model_refill_order = Model('refill_order');
|
|
|
$condition['refill_order.inner_status'] = 0;
|
|
|
|
|
|
+=======
|
|
|
+ public function refill_orderOp()
|
|
|
+ {
|
|
|
+ $model_refill_order = Model('refill_order');
|
|
|
+ $condition = [];
|
|
|
+>>>>>>> a6ba406cb16e9d0e3722be24363c0a95891f5fd5
|
|
|
if (!empty($_GET['order_sn'])) {
|
|
|
$condition['refill_order.order_sn'] = $_GET['order_sn'];
|
|
|
}
|
|
@@ -825,11 +838,23 @@ class merchantControl extends SystemControl
|
|
|
if (!empty($_GET['channel_name'])) {
|
|
|
$condition['refill_order.channel_name'] = $_GET['channel_name'];
|
|
|
}
|
|
|
+<<<<<<< HEAD
|
|
|
if (!empty($_GET['store_id'])) {
|
|
|
$condition['vr_order.store_id'] = $_GET['store_id'];
|
|
|
}
|
|
|
if (!empty($_GET['card_type']))
|
|
|
{
|
|
|
+=======
|
|
|
+ if (!empty($_GET['ch_trade_no'])) {
|
|
|
+ $condition['refill_order.ch_trade_no'] = $_GET['ch_trade_no'];
|
|
|
+ }
|
|
|
+ if (!empty($_GET['card_no'])) {
|
|
|
+ $condition['refill_order.card_no'] = $_GET['card_no'];
|
|
|
+ }
|
|
|
+ $condition['refill_order.order_time'] = ['time', [strtotime(date("Y-m-d")), strtotime(date("Y-m-d"))]];
|
|
|
+ $condition['refill_order.inner_status'] = 0;
|
|
|
+ if (!empty($_GET['card_type'])) {
|
|
|
+>>>>>>> a6ba406cb16e9d0e3722be24363c0a95891f5fd5
|
|
|
if(in_array($_GET['card_type'] , ['1' , '2' , '4' , '5' , '6'])) {
|
|
|
$condition['refill_order.card_type'] = $_GET['card_type'];
|
|
|
}
|
|
@@ -840,16 +865,20 @@ class merchantControl extends SystemControl
|
|
|
$condition['refill_order.card_type'] = ['in' , ['4' , '5' , '6']];
|
|
|
}
|
|
|
}
|
|
|
+<<<<<<< HEAD
|
|
|
if (!empty($_GET['ch_trade_no'])) {
|
|
|
$condition['refill_order.ch_trade_no'] = $_GET['ch_trade_no'];
|
|
|
}
|
|
|
if (!empty($_GET['card_no'])) {
|
|
|
$condition['refill_order.card_no'] = $_GET['card_no'];
|
|
|
}
|
|
|
+=======
|
|
|
+>>>>>>> a6ba406cb16e9d0e3722be24363c0a95891f5fd5
|
|
|
if (in_array($_GET['refill_amount'], ['10', '20', '30', '50' , '100', '200', '300', '500' , '1000', '20000'])) {
|
|
|
$condition['refill_order.refill_amount'] = $_GET['refill_amount'];
|
|
|
}
|
|
|
|
|
|
+<<<<<<< HEAD
|
|
|
$start_unixtime = strtotime($_GET['query_start_time']);
|
|
|
$end_unixtime = strtotime($_GET['query_end_time']);
|
|
|
if ($start_unixtime >0) {
|
|
@@ -857,6 +886,14 @@ class merchantControl extends SystemControl
|
|
|
$end_unixtime = time();
|
|
|
}
|
|
|
$condition['refill_order.order_time'] = [ ['egt', $start_unixtime] , ['lt', $end_unixtime] , 'and'];
|
|
|
+=======
|
|
|
+ $if_start_time = preg_match('/^20\d{2}-\d{2}-\d{2}$/', $_GET['query_start_time']);
|
|
|
+ $if_end_time = preg_match('/^20\d{2}-\d{2}-\d{2}$/', $_GET['query_end_time']);
|
|
|
+ $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'] = ['time', [$start_unixtime, $end_unixtime]];
|
|
|
+>>>>>>> a6ba406cb16e9d0e3722be24363c0a95891f5fd5
|
|
|
}
|
|
|
|
|
|
if (in_array($_GET['order_state'], ['0', '10', '20', '30', '40']))
|
|
@@ -886,14 +923,14 @@ class merchantControl extends SystemControl
|
|
|
$order_list[$order_id]['mch_name'] = $merchants[$order_info['mchid']]['company_name'];
|
|
|
if($order_info['notify_time'] > 0)
|
|
|
{
|
|
|
- $order_list[$order_id]['diff_time_text'] = $this->elapse_time($order_info['notify_time'] - $order_info['order_time']);
|
|
|
- $order_list[$order_id]['diff_time'] = $order_info['notify_time'] - $order_info['order_time'];
|
|
|
+ $diff_time = $order_info['notify_time'] - $order_info['order_time'];
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- $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'];
|
|
|
+ $diff_time = time() - $order_info['order_time'];
|
|
|
}
|
|
|
+ $order_list[$order_id]['diff_time_text'] = $this->elapse_time($diff_time);
|
|
|
+ $order_list[$order_id]['diff_time'] = $diff_time;
|
|
|
}
|
|
|
$provider_list = Model('')->table('refill_provider,store')->field('refill_provider.*,store.store_name')->join('inner')->on('store.store_id=refill_provider.store_id')->limit(100)->select();
|
|
|
|
|
@@ -1340,6 +1377,7 @@ class merchantControl extends SystemControl
|
|
|
|
|
|
private function refill_stat($condition)
|
|
|
{
|
|
|
+<<<<<<< HEAD
|
|
|
$stat_order = function ($condition) {
|
|
|
$stat = Model('')->table('refill_order,vr_order')->join('inner')
|
|
|
->on('refill_order.order_id=vr_order.order_id')
|
|
@@ -1409,5 +1447,20 @@ class merchantControl extends SystemControl
|
|
|
Tpl::output('provider_list', $provider_list);
|
|
|
Tpl::output('show_page', $model_refill_order->showpage());
|
|
|
Tpl::showpage('refill.order.send.index');
|
|
|
+=======
|
|
|
+ $condition['order_state'] = ORDER_STATE_SEND;
|
|
|
+
|
|
|
+ $condition['refill_order.order_time'] = ['between', [(time() - 3600) , (time() - 1800)]];
|
|
|
+ $half_stats = Model('')->table('refill_order,vr_order')->join('inner')
|
|
|
+ ->on('refill_order.order_id=vr_order.order_id')
|
|
|
+ ->field('count(*) as order_count ')
|
|
|
+ ->where($condition)->find();
|
|
|
+ $condition['refill_order.order_time'] = ['lt', (time() - 3600)];
|
|
|
+ $hour_stats = Model('')->table('refill_order,vr_order')->join('inner')
|
|
|
+ ->on('refill_order.order_id=vr_order.order_id')
|
|
|
+ ->field('count(*) as order_count ')
|
|
|
+ ->where($condition)->find();
|
|
|
+ return ['half_count' => $half_stats['order_count'] , 'hour_count' => $hour_stats['order_count']];
|
|
|
+>>>>>>> a6ba406cb16e9d0e3722be24363c0a95891f5fd5
|
|
|
}
|
|
|
}
|