fix: 套餐使用租户查询keyword为空时报错
This commit is contained in:
@@ -89,10 +89,10 @@ public sealed class GetTenantPackageTenantsQueryHandler(IDapperExecutor dapperEx
|
|||||||
where t."DeletedAt" is null
|
where t."DeletedAt" is null
|
||||||
and (
|
and (
|
||||||
@keyword is null
|
@keyword is null
|
||||||
or t."Name" ilike ('%' || @keyword || '%')
|
or t."Name" ilike ('%' || @keyword::text || '%')
|
||||||
or t."Code" ilike ('%' || @keyword || '%')
|
or t."Code" ilike ('%' || @keyword::text || '%')
|
||||||
or coalesce(t."ContactName", '') ilike ('%' || @keyword || '%')
|
or coalesce(t."ContactName", '') ilike ('%' || @keyword::text || '%')
|
||||||
or coalesce(t."ContactPhone", '') ilike ('%' || @keyword || '%')
|
or coalesce(t."ContactPhone", '') ilike ('%' || @keyword::text || '%')
|
||||||
)
|
)
|
||||||
and exists (
|
and exists (
|
||||||
select 1
|
select 1
|
||||||
@@ -135,10 +135,10 @@ public sealed class GetTenantPackageTenantsQueryHandler(IDapperExecutor dapperEx
|
|||||||
where t."DeletedAt" is null
|
where t."DeletedAt" is null
|
||||||
and (
|
and (
|
||||||
@keyword is null
|
@keyword is null
|
||||||
or t."Name" ilike ('%' || @keyword || '%')
|
or t."Name" ilike ('%' || @keyword::text || '%')
|
||||||
or t."Code" ilike ('%' || @keyword || '%')
|
or t."Code" ilike ('%' || @keyword::text || '%')
|
||||||
or coalesce(t."ContactName", '') ilike ('%' || @keyword || '%')
|
or coalesce(t."ContactName", '') ilike ('%' || @keyword::text || '%')
|
||||||
or coalesce(t."ContactPhone", '') ilike ('%' || @keyword || '%')
|
or coalesce(t."ContactPhone", '') ilike ('%' || @keyword::text || '%')
|
||||||
)
|
)
|
||||||
order by t."CreatedAt" desc
|
order by t."CreatedAt" desc
|
||||||
offset @offset
|
offset @offset
|
||||||
|
|||||||
Reference in New Issue
Block a user