diff --git a/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/GetTenantPackageTenantsQueryHandler.cs b/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/GetTenantPackageTenantsQueryHandler.cs index edc4e7c..d14aed2 100644 --- a/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/GetTenantPackageTenantsQueryHandler.cs +++ b/src/Application/TakeoutSaaS.Application/App/Tenants/Handlers/GetTenantPackageTenantsQueryHandler.cs @@ -89,10 +89,10 @@ public sealed class GetTenantPackageTenantsQueryHandler(IDapperExecutor dapperEx where t."DeletedAt" is null and ( @keyword is null - or t."Name" ilike ('%' || @keyword || '%') - or t."Code" ilike ('%' || @keyword || '%') - or coalesce(t."ContactName", '') ilike ('%' || @keyword || '%') - or coalesce(t."ContactPhone", '') ilike ('%' || @keyword || '%') + or t."Name" ilike ('%' || @keyword::text || '%') + or t."Code" ilike ('%' || @keyword::text || '%') + or coalesce(t."ContactName", '') ilike ('%' || @keyword::text || '%') + or coalesce(t."ContactPhone", '') ilike ('%' || @keyword::text || '%') ) and exists ( select 1 @@ -135,10 +135,10 @@ public sealed class GetTenantPackageTenantsQueryHandler(IDapperExecutor dapperEx where t."DeletedAt" is null and ( @keyword is null - or t."Name" ilike ('%' || @keyword || '%') - or t."Code" ilike ('%' || @keyword || '%') - or coalesce(t."ContactName", '') ilike ('%' || @keyword || '%') - or coalesce(t."ContactPhone", '') ilike ('%' || @keyword || '%') + or t."Name" ilike ('%' || @keyword::text || '%') + or t."Code" ilike ('%' || @keyword::text || '%') + or coalesce(t."ContactName", '') ilike ('%' || @keyword::text || '%') + or coalesce(t."ContactPhone", '') ilike ('%' || @keyword::text || '%') ) order by t."CreatedAt" desc offset @offset