`id`,`tenant_id`,`coupon_id`,`coupon_order_id`,`channel_type`,`channel_id`,`createtime`
where 1 = 1
and `id` = #{id}
and `tenant_id` like concat('%', #{tenantId},'%')
and `coupon_id` = #{couponId}
and `coupon_order_id` = #{couponOrderId}
and `channel_type` = #{channelType}
and `channel_id` = #{channelId}
and `createtime` = #{createtime}
and `createtime` >= #{startTime}
and `createtime` <= #{endTime}
and id in
#{idItem}
order by ${sortColumns}