作者 lyh

gx

... ... @@ -137,7 +137,22 @@ class InquiryMonthlyCount extends Command
->where('updated_date','>=',$startTime->toDateString())
->where('updated_date','<=',$endTime->toDateString())
->orderBy('ip','desc')->limit(15)->get()->toArray();
//受访界面
//受访界面前15
$arr['referrer_url'] = DB::table('gl_customer_visit_item')
->select('url',DB::raw('COUNT(*) as num'))
->orderBy('num','desc')
->where('updated_date','>=',$startTime->toDateString())
->where('updated_date','<=',$endTime->toDateString())
->groupBy('url')->where(['domain'=>'http://lxl.petuu.shop/'])
->limit(15)->get()->toArray();
//访问断后
$arr['referrer_url'] = DB::table('gl_customer_visit_item')
->select('device_port',DB::raw('COUNT(*) as num'))
->orderBy('num','desc')
->where('updated_date','>=',$startTime->toDateString())
->where('updated_date','<=',$endTime->toDateString())
->groupBy('url')->where(['domain'=>'http://lxl.petuu.shop/'])
->limit(15)->get()->toArray();
return $arr;
}
}
... ...
... ... @@ -151,12 +151,11 @@ class ComController extends BaseController
$startTime = Carbon::now()->subMonth()->startOfMonth()->toDateString();
// 获取上个月的结束时间
$endTime = Carbon::now()->subMonth()->endOfMonth()->toDateString();
$arr = DB::table('gl_customer_visit_item')
->select('url',DB::raw('COUNT(*) as num'))
$arr['referrer_url'] = DB::table('gl_customer_visit_item')
->select('device_port',DB::raw('COUNT(*) as num'))
->orderBy('num','desc')
->groupBy('url')->where(['domain'=>'http://lxl.petuu.shop/'])
->limit(15)->get()->toArray();
return $arr;
}
... ...