|
@@ -28,7 +28,7 @@ class OrderRateByDay extends Command {
|
28
|
28
|
//第一步: 统计昨日数据
|
29
|
29
|
#昨日加粉 and 昨日成单
|
30
|
30
|
$phones = DB::table('customers')->where('fanTime', $date)->lists('phone');
|
31
|
|
- $order_count = DB::table('order')->whereIn('receiverMobile', $phones)->where('createTime','>',$date)->where('createTime','<=',$date.' 23:59:59')->where('is_del', 0)->count();
|
|
31
|
+ $order_count = DB::table('order')->whereIn('receiverMobile', $phones)->where('createTime','>=',$date)->where('createTime','<=',$date.' 23:59:59')->where('is_del', 0)->count();
|
32
|
32
|
#昨日加粉
|
33
|
33
|
$fan_add = DB::table('cust_day_detail')->where('is_del', 0)->where('dtime', $date)->sum('fan_add');
|
34
|
34
|
#计算昨日成单率
|
|
@@ -45,7 +45,7 @@ class OrderRateByDay extends Command {
|
45
|
45
|
foreach($dates as $k=>$v){
|
46
|
46
|
#当前日期加粉 and 昨日成单
|
47
|
47
|
$phones = DB::table('customers')->where('fanTime', $v['idate'])->lists('phone');
|
48
|
|
- $order_count = DB::table('order')->whereIn('receiverMobile', $phones)->where('createTime','>',$date)->where('createTime','<=',$date.' 23:59:59')->where('is_del', 0)->count();
|
|
48
|
+ $order_count = DB::table('order')->whereIn('receiverMobile', $phones)->where('createTime','>=',$date)->where('createTime','<=',$date.' 23:59:59')->where('is_del', 0)->count();
|
49
|
49
|
#当前日期加粉
|
50
|
50
|
$fan_add = DB::table('cust_day_detail')->where('is_del', 0)->where('dtime', $v['idate'])->sum('fan_add');
|
51
|
51
|
#计算当前日期加粉在昨日成单率
|