重构初始化

This commit is contained in:
技术老胡
2026-04-15 11:45:46 +08:00
parent 72d72d735b
commit 7612026773
381 changed files with 28287 additions and 14717 deletions

View File

@@ -0,0 +1,33 @@
<?php
namespace app\repository\ops\stat;
use app\common\base\BaseRepository;
use app\model\admin\ChannelDailyStat;
/**
* 通道日统计仓库。
*/
class ChannelDailyStatRepository extends BaseRepository
{
/**
* 构造函数,注入对应模型。
*/
public function __construct()
{
parent::__construct(new ChannelDailyStat());
}
/**
* 根据通道和日期查询统计记录。
*/
public function findByChannelAndDate(int $channelId, string $statDate, array $columns = ['*'])
{
return $this->model->newQuery()
->where('channel_id', $channelId)
->where('stat_date', $statDate)
->first($columns);
}
}