|
...
|
...
|
@@ -13,6 +13,7 @@ use App\Models\Geo\GeoQuestionLog; |
|
|
|
use App\Models\Geo\GeoQuestionResult;
|
|
|
|
use Illuminate\Console\Command;
|
|
|
|
use Illuminate\Support\Carbon;
|
|
|
|
use App\Models\Geo\GeoCount as GeoCountModel;
|
|
|
|
|
|
|
|
class GeoCount extends Command
|
|
|
|
{
|
|
...
|
...
|
@@ -50,6 +51,7 @@ class GeoCount extends Command |
|
|
|
*/
|
|
|
|
public function _action()
|
|
|
|
{
|
|
|
|
$geoCountModel = new GeoCountModel();
|
|
|
|
//获取前一天的项目id
|
|
|
|
$date = Carbon::yesterday()->format('Y-m-d');
|
|
|
|
$start = $date.' 00:00:00';
|
|
...
|
...
|
@@ -76,7 +78,7 @@ class GeoCount extends Command |
|
|
|
$data[$platform] = $geoQuestionResModel->counts(['project_id' => $item,'hit'=>['!=',0],'platform'=>$platform,'created_at' => ['between',[$start,$end]]]);
|
|
|
|
}
|
|
|
|
//新增一条数据
|
|
|
|
$geoQuestionResModel->addReturnId($data);
|
|
|
|
$geoCountModel->addReturnId($data);
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
...
|
...
|
|