`id`,`tenant_id`,`parent_tenant_id`,`coupon_id`,`coupon_order_id`,`channel_type`,`channel_id`,`create_time`,`type`,`used_credit`,`add_credit`
where 1 = 1
and `id` = #{id}
and `tenant_id` = #{tenantId}
and `parent_tenant_id` = #{parentTenantId}
and `game_id` = #{gameId}
and `user_id` = #{userId}
and `coupon_order_id` = #{couponOrderId}
and `create_time` = #{createTime}
and `start_time` >= #{startTime}
and `end_time` <= #{endTime}
and `type` = #{type}
and id in
#{idItem}
order by ${sortColumns}
where 1 = 1
and `id` = #{id}
and `tenant_id` = #{tenantId}
and `parent_tenant_id` = #{parentTenantId}
and `game_id` = #{gameId}
and `user_id` = #{userId}
and `coupon_order_id` = #{couponOrderId}
and `create_time` >= #{startTime}
and `create_time` <= #{endTime}
and `type` = #{type}