作者 张关杰

Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6 into develop

... ... @@ -80,7 +80,7 @@ class Count extends Command
}
/**
* @name :(统计pv)pv_num
* @name :(统计ip)ip_num
* @author :lyh
* @method :post
* @time :2023/6/14 15:40
... ...
... ... @@ -125,24 +125,21 @@ class InquiryMonthlyCount extends Command
$source = DB::table('gl_customer_visit')
->select('referrer_url', DB::raw('COUNT(*) as count'))
->groupBy('referrer_url')->where(['domain'=>$domain])
->where('updated_date','>=',$startTime->toDateString())
->where('updated_date','<=',$endTime->toDateString())
->whereBetween('updated_date', [$startTime->toDateString(),$endTime->toDateString()])
->orderByDesc('count')->limit(10)->get()->toArray();
$arr['source'] = json_encode($source);
//访问国家前15
$source_country = DB::table('gl_customer_visit')
->select('country',DB::raw('COUNT(*) as ip'),DB::raw('SUM(depth) as pv'))
->groupBy('country')->where(['domain'=>$domain])
->where('updated_date','>=',$startTime->toDateString())
->where('updated_date','<=',$endTime->toDateString())
->whereBetween('updated_date', [$startTime->toDateString(),$endTime->toDateString()])
->orderBy('ip','desc')->limit(15)->get()->toArray();
$arr['source_country'] = json_encode($source_country);
//受访界面前15
$referrer_url = DB::table('gl_customer_visit')
->select('url',DB::raw('COUNT(*) as num'))
->orderBy('num','desc')->where(['domain'=>$domain])
->where('updated_date','>=',$startTime->toDateString())
->where('updated_date','<=',$endTime->toDateString())
->whereBetween('updated_date', [$startTime->toDateString(),$endTime->toDateString()])
->groupBy('url')
->limit(15)->get()->toArray();
$arr['referrer_url'] = json_encode($referrer_url);
... ... @@ -150,8 +147,7 @@ class InquiryMonthlyCount extends Command
$referrer_port = DB::table('gl_customer_visit')
->select('device_port',DB::raw('COUNT(*) as num'))
->orderBy('num','desc')->where(['domain'=>$domain])
->where('updated_date','>=',$startTime->toDateString())
->where('updated_date','<=',$endTime->toDateString())
->whereBetween('updated_date', [$startTime->toDateString(),$endTime->toDateString()])
->groupBy('device_port')
->limit(15)->get()->toArray();
$arr['referrer_port'] = json_encode($referrer_port);
... ...
... ... @@ -123,24 +123,21 @@ class MonthCountLogic extends BaseLogic
$source = DB::table('gl_customer_visit')
->select('referrer_url', DB::raw('COUNT(*) as count'))
->groupBy('referrer_url')->where(['domain'=>$domain])
// ->where('updated_date','>=',$startTime)
// ->where('updated_date','<=',$endTime)
// ->whereBetween('updated_date', [$startTime,$endTime])
->orderByDesc('count')->limit(10)->get()->toArray();
$arr['source'] = $source;
//访问国家前15
$source_country = DB::table('gl_customer_visit')
->select('country',DB::raw('COUNT(*) as ip'),DB::raw('SUM(depth) as pv'))
->groupBy('country')->where(['domain'=>$domain])
// ->where('updated_date','>=',$startTime)
// ->where('updated_date','<=',$endTime)
// ->whereBetween('updated_date', [$startTime,$endTime])
->orderBy('ip','desc')->limit(15)->get()->toArray();
$arr['source_country'] = $source_country;
//受访界面前15
$referrer_url = DB::table('gl_customer_visit')
->select('url',DB::raw('COUNT(*) as num'))
->orderBy('num','desc')->where(['domain'=>$domain])
// ->where('updated_date','>=',$startTime)
// ->where('updated_date','<=',$endTime)
// ->whereBetween('updated_date', [$startTime,$endTime])
->groupBy('url')
->limit(15)->get()->toArray();
$arr['referrer_url'] = $referrer_url;
... ... @@ -148,8 +145,7 @@ class MonthCountLogic extends BaseLogic
$referrer_port = DB::table('gl_customer_visit')
->select('device_port',DB::raw('COUNT(*) as num'))
->orderBy('num','desc')->where(['domain'=>$domain])
// ->where('updated_date','>=',$startTime)
// ->where('updated_date','<=',$endTime)
// ->whereBetween('updated_date', [$startTime,$endTime])
->groupBy('device_port')
->limit(15)->get()->toArray();
$arr['referrer_port'] = $referrer_port;
... ...
... ... @@ -185,7 +185,7 @@ class Base extends Model
$query->whereIn($k, $v[1]);
break;
case 'or':
// in查询 ['id'=>['in',[1,2,3]]]
// in查询 ['id'=>['or',[1,2,3]]]
$query->orWhere($k, $v[1]);
break;
case 'not in':
... ...