`id`,`tenant_id`,`c_user_id`,`create_date`,`score_type`,`valid_date`,`order_id`,`pay_type`,`pay_amount`,`score_amount`,`reason`
where 1 = 1
and `id` = #{id}
and `tenant_id` = #{tenantId}
and `c_user_id` = #{cUserId}
and `create_date` = #{createDate}
and `score_type` = #{scoreType}
and `valid_date` = #{validDate}
and `order_id` = #{orderId}
and `pay_type` = #{payType}
and `pay_amount` = #{payAmount}
and `score_amount` = #{scoreAmount}
and `reason` = #{reason}
and `create_date` between #{startdate} and #{enddate}
and id in
#{idItem}
order by ${sortColumns}
delete from wx_score_history where id = #{id} and tenant_id = #{tenantId}