|
...
|
...
|
@@ -35,7 +35,7 @@ class UpgradeProjectCount extends Command |
|
|
|
protected $description = '升级项目统计';
|
|
|
|
|
|
|
|
public function handle(){
|
|
|
|
ProjectServer::useProject(439);
|
|
|
|
ProjectServer::useProject(627);
|
|
|
|
$this->count();
|
|
|
|
|
|
|
|
DB::disconnect('custom_mysql');
|
|
...
|
...
|
@@ -60,8 +60,8 @@ class UpgradeProjectCount extends Command |
|
|
|
$start = date('Y-m-01', strtotime($v['month']));
|
|
|
|
// 获取当月结束时间
|
|
|
|
$end = date('Y-m-t', strtotime($v['month']));
|
|
|
|
$arr['project_id'] = 439;
|
|
|
|
$res = $this->inquiry('www.cnzyl.com',$v['month']);
|
|
|
|
$arr['project_id'] = 627;
|
|
|
|
$res = $this->inquiry('www.airuize.com',$v['month']);
|
|
|
|
$arr['month_total'] = 0;
|
|
|
|
if(isset($res['data']['count'])){
|
|
|
|
$arr['month_total'] = $res['data']['count'];
|
|
...
|
...
|
@@ -94,7 +94,7 @@ class UpgradeProjectCount extends Command |
|
|
|
*/
|
|
|
|
public function pv_ip(&$arr,$start,$end){
|
|
|
|
$pv_ip = DB::table('gl_count')
|
|
|
|
->where(['project_id'=>439])
|
|
|
|
->where(['project_id'=>627])
|
|
|
|
->where('date','>=',$start.' 00:00:00')
|
|
|
|
->where('date','<=',$end.' 23:59:59')
|
|
|
|
->select(DB::raw('SUM(pv_num) as pv_num'), DB::raw('SUM(ip_num) as ip_num'),DB::raw('SUM(inquiry_num) as inquiry_num'))
|
...
|
...
|
|