select template_id,
template_code,
template_name,
business_type,
template_version,
storage_type,
storage_key,
file_hash,
status,
is_default,
effective_start,
effective_end,
remark
from ar_export_template
where business_type = #{businessType}
and status = 'ENABLED'
and (effective_start is null or effective_start <= #{effectiveDate})
and (effective_end is null or effective_end >= #{effectiveDate})