作者 李宇航

合并分支 'lyh-server' 到 'master'

变更数据



查看合并请求 !2949
... ... @@ -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;
}
... ...
<?php
/**
* @remark :
* @name :GeoCount.php
* @author :lyh
* @method :post
* @time :2025/10/14 10:23
*/
namespace App\Models\Geo;
use App\Models\Base;
class GeoCount extends Base
{
protected $table = 'gl_geo_count';
}
... ...