`id`,`tenant_id`,`parent_tenant_id`,`merchant_id`,`level_id`,`create_date`,`discount`
where 1 = 1
and `id` = #{id}
and `tenant_id` = #{tenantId}
and `parent_tenant_id` = #{parentTenantId}
and `merchant_id` = #{merchantId}
and `level_id` = #{levelId}
and `create_date` = #{createDate}
and `discount` = #{discount}
and id in
#{idItem}
order by ${sortColumns}
m.id,m.name,m.link_phone,
lm.discount,m.link_line_phone
where 1 = 1
and lm.`tenant_id` = #{tenantId}
and lm.`parent_tenant_id` = #{parentTenantId}
and lm.merchant_id = #{merchantId}
and lm.level_id = #{levelId}
and lm.discount = #{discount}
order by ${sortColumns}