fix Creative 2

This commit is contained in:
huangguancheng 2025-01-10 20:27:02 +08:00
parent 568df50454
commit 2577f5df58

View File

@ -831,8 +831,10 @@ class AdsInsightService
{
// 1. 创建查询对象,初始化 BpsAdCreativeInsight 查询
$creativeDataQuery = BpsAdCreativeInsight::alias('i')
->join('bps.bps_ads_creative c', 'i.creative_id = c.creative_id', 'LEFT') // 联接 bps_ads_creative 表
->where('i.platform', $platformType); // 根据 platform 筛选
->join('bps.bps_ads_creative c', 'i.creative_id = c.creative_id', 'LEFT'); // 联接 bps_ads_creative 表
if ($platformType != 0) {
$creativeDataQuery->where('i.platform', $platformType); // 只有 platformType 不为 0 时才添加筛选
}
// 2. 日期范围筛选
if ($startDate && $endDate) {