|
@@ -148,7 +148,7 @@ class ComController extends BaseController |
|
@@ -148,7 +148,7 @@ class ComController extends BaseController |
|
148
|
|
148
|
|
|
149
|
public function ceshi(){
|
149
|
public function ceshi(){
|
|
150
|
|
150
|
|
|
151
|
- $startTime = Carbon::now()->subMonth()->startOfMonth();
|
151
|
+ $startTime = Carbon::now()->subMonth(1)->startOfMonth();
|
|
152
|
// 获取上个月的结束时间
|
152
|
// 获取上个月的结束时间
|
|
153
|
$endTime = Carbon::now()->subMonth(1)->endOfMonth();
|
153
|
$endTime = Carbon::now()->subMonth(1)->endOfMonth();
|
|
154
|
$pv = DB::table('gl_count')
|
154
|
$pv = DB::table('gl_count')
|
|
@@ -156,7 +156,7 @@ class ComController extends BaseController |
|
@@ -156,7 +156,7 @@ class ComController extends BaseController |
|
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');
|
158
|
->sum('pv_num');
|
|
159
|
- $this->response('success',Code::SUCCESS,$endTime);
|
159
|
+ $this->response('success',Code::SUCCESS,$pv);
|
|
160
|
}
|
160
|
}
|
|
161
|
|
161
|
|
|
162
|
/**
|
162
|
/**
|