正在显示
1 个修改的文件
包含
2 行增加
和
1 行删除
| @@ -155,7 +155,8 @@ class ComController extends BaseController | @@ -155,7 +155,8 @@ class ComController extends BaseController | ||
| 155 | ->where(['project_id'=>1]) | 155 | ->where(['project_id'=>1]) |
| 156 | ->where('date','>=',$startTime->toDateString().' 00:00:00') | 156 | ->where('date','>=',$startTime->toDateString().' 00:00:00') |
| 157 | ->where('date','<=',$endTime->toDateString().' 23:59:59') | 157 | ->where('date','<=',$endTime->toDateString().' 23:59:59') |
| 158 | - ->sum('pv_num+ip_num'); | 158 | + ->select(DB::raw('SUM(pv_num) as pv_num'), DB::raw('SUM(ip_num) as ip_num')) |
| 159 | + ->get(); | ||
| 159 | 160 | ||
| 160 | $this->response('success',Code::SUCCESS,$pv); | 161 | $this->response('success',Code::SUCCESS,$pv); |
| 161 | } | 162 | } |
-
请 注册 或 登录 后发表评论