|
@@ -55,12 +55,11 @@ class handler
|
|
|
|
|
|
public function refill_order_stat_ex($cond)
|
|
public function refill_order_stat_ex($cond)
|
|
{
|
|
{
|
|
- $tmcond_gen = function ($time_scope,$cur_start,$cur_end)
|
|
|
|
|
|
+ $tmcond_gen = function ($cur_start,$cur_end)
|
|
{
|
|
{
|
|
$cond['refill_order.order_time'] = [['egt', $cur_start], ['lt', $cur_end], 'and'];
|
|
$cond['refill_order.order_time'] = [['egt', $cur_start], ['lt', $cur_end], 'and'];
|
|
-
|
|
|
|
- [$start, $end] = $time_scope['add_time'];
|
|
|
|
- $cond['vr_order.add_time'] = [['egt', $start], ['elt', $end], 'and'];
|
|
|
|
|
|
+ $end = $cur_end + 86400*2;
|
|
|
|
+ $cond['vr_order.add_time'] = [['egt', $cur_start], ['elt', $end], 'and'];
|
|
|
|
|
|
return $cond;
|
|
return $cond;
|
|
};
|
|
};
|
|
@@ -79,7 +78,7 @@ class handler
|
|
$cur_end = $cur_start + 3600;
|
|
$cur_end = $cur_start + 3600;
|
|
}
|
|
}
|
|
|
|
|
|
- $tmcond = $tmcond_gen($time_scope, $cur_start, $cur_end);
|
|
|
|
|
|
+ $tmcond = $tmcond_gen($cur_start, $cur_end);
|
|
$cond = array_merge($normal_cond, $tmcond);
|
|
$cond = array_merge($normal_cond, $tmcond);
|
|
|
|
|
|
$mod = Model();
|
|
$mod = Model();
|
|
@@ -166,18 +165,16 @@ class handler
|
|
$tmcond_gen = function ($time_type,$time_scope,$cur_start,$cur_end)
|
|
$tmcond_gen = function ($time_type,$time_scope,$cur_start,$cur_end)
|
|
{
|
|
{
|
|
if($time_type == 'notify_time') {
|
|
if($time_type == 'notify_time') {
|
|
- [$start, $end] = $time_scope['order_time'];
|
|
|
|
- $cond['refill_order.order_time'] = [['egt', $start], ['lt', $end], 'and'];
|
|
|
|
|
|
+ $start = $cur_start - 86400*2;
|
|
|
|
+ $end = $cur_end + 86400*2;
|
|
|
|
|
|
- [$start, $end] = $time_scope['add_time'];
|
|
|
|
|
|
+ $cond['refill_order.order_time'] = [['egt', $start], ['lt', $cur_end], 'and'];
|
|
$cond['vr_order.add_time'] = [['egt', $start], ['elt', $end], 'and'];
|
|
$cond['vr_order.add_time'] = [['egt', $start], ['elt', $end], 'and'];
|
|
-
|
|
|
|
$cond['refill_order.notify_time'] = [['egt', $cur_start], ['lt', $cur_end], 'and'];
|
|
$cond['refill_order.notify_time'] = [['egt', $cur_start], ['lt', $cur_end], 'and'];
|
|
} else {
|
|
} else {
|
|
$cond['refill_order.order_time'] = [['egt', $cur_start], ['lt', $cur_end], 'and'];
|
|
$cond['refill_order.order_time'] = [['egt', $cur_start], ['lt', $cur_end], 'and'];
|
|
-
|
|
|
|
- [$start, $end] = $time_scope['add_time'];
|
|
|
|
- $cond['vr_order.add_time'] = [['egt', $start], ['elt', $end], 'and'];
|
|
|
|
|
|
+ $end = $cur_end + 86400*2;
|
|
|
|
+ $cond['vr_order.add_time'] = [['egt', $cur_start], ['elt', $end], 'and'];
|
|
}
|
|
}
|
|
|
|
|
|
return $cond;
|
|
return $cond;
|