fix parser адаптера

This commit is contained in:
Artem Tsyrulnikov
2026-01-18 13:38:25 +03:00
parent 68e7dc4158
commit d8202e1141
2 changed files with 4 additions and 4 deletions

View File

@@ -19,9 +19,9 @@ func (d *Database) GetChannelsWithTrackedPosts(ctx context.Context) ([]domain.Ch
c.access_hash, c.access_hash,
c.pts c.pts
FROM channel c FROM channel c
INNER JOIN purchase_channel pc ON pc.channel_id = c.id INNER JOIN placement p ON p.channel_id = c.id
INNER JOIN placement p ON p.purchase_channel_id = pc.id INNER JOIN placement_post pp ON pp.placement_id = p.id
INNER JOIN post po ON po.id = p.post_id INNER JOIN post po ON po.id = pp.post_id
WHERE po.deleted_from_channel_at IS NULL;` WHERE po.deleted_from_channel_at IS NULL;`
txOrPool := transaction.TryExtractTX(ctx) txOrPool := transaction.TryExtractTX(ctx)

View File

@@ -30,7 +30,7 @@ func (d *Database) GetTrackedPosts(ctx context.Context, channel domain.Channel)
) as views ) as views
FROM post p FROM post p
INNER JOIN channel c ON c.id = p.channel_id INNER JOIN channel c ON c.id = p.channel_id
INNER JOIN placement pl ON pl.post_id = p.id INNER JOIN placement_post pp ON pp.post_id = p.id
WHERE p.channel_id = $1 WHERE p.channel_id = $1
AND p.deleted_from_channel_at IS NULL;` AND p.deleted_from_channel_at IS NULL;`