作者 lyh

gx

@@ -84,6 +84,13 @@ class InquiryMonthlyCount extends Command @@ -84,6 +84,13 @@ class InquiryMonthlyCount extends Command
84 $arr['created_at'] = date('Y-m-d H:i:s'); 84 $arr['created_at'] = date('Y-m-d H:i:s');
85 $arr['updated_at'] = date('Y-m-d H:i:s'); 85 $arr['updated_at'] = date('Y-m-d H:i:s');
86 $arr['project_id'] = $project_id; 86 $arr['project_id'] = $project_id;
  87 + $pv_ip = DB::table('gl_count')
  88 + ->where(['project_id'=>1])
  89 + ->where('date','>=',$startTime->toDateString().' 00:00:00')
  90 + ->where('date','<=',$endTime->toDateString().' 23:59:59')
  91 + ->select(DB::raw('SUM(pv_num) as pv_num'), DB::raw('SUM(ip_num) as ip_num'))
  92 + ->get();
  93 +
87 DB::table('gl_inquiry_month_count')->insert($arr); 94 DB::table('gl_inquiry_month_count')->insert($arr);
88 } 95 }
89 96
@@ -157,7 +157,8 @@ class ComController extends BaseController @@ -157,7 +157,8 @@ class ComController extends BaseController
157 ->where('date','<=',$endTime->toDateString().' 23:59:59') 157 ->where('date','<=',$endTime->toDateString().' 23:59:59')
158 ->select(DB::raw('SUM(pv_num) as pv_num'), DB::raw('SUM(ip_num) as ip_num')) 158 ->select(DB::raw('SUM(pv_num) as pv_num'), DB::raw('SUM(ip_num) as ip_num'))
159 ->get(); 159 ->get();
160 - 160 + var_dump($pv);
  161 + die();
161 $this->response('success',Code::SUCCESS,$pv); 162 $this->response('success',Code::SUCCESS,$pv);
162 } 163 }
163 164