From b0a0b793bd441b3266a5350f828143bf0f0d3b58 Mon Sep 17 00:00:00 2001 From: ferdiansyah783 Date: Thu, 22 Aug 2024 13:11:22 +0700 Subject: [PATCH] fix: soft delete --- internal/repository/sites/sites.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/repository/sites/sites.go b/internal/repository/sites/sites.go index aa60928..98218d0 100644 --- a/internal/repository/sites/sites.go +++ b/internal/repository/sites/sites.go @@ -272,7 +272,7 @@ func (r *SiteRepository) SearchSites(ctx context.Context, search *entity.Discove SELECT *, ROW_NUMBER() OVER (PARTITION BY site_id ORDER BY price ASC) AS rn FROM products ) p ON s.id = p.site_id AND p.rn = 1 - WHERE ` + conditions + ` + WHERE ` + conditions + ` and s.deleted_at IS NULL and s.status = 'Active' ORDER BY s.name LIMIT ? OFFSET ? `