`id`,`tenant_id`,`parent_tenant_id`,`order_id`,`order_type`,`merchant_id`,`b_tenant_id`,`coupon_order_id`,`coupon_type`,`order_payment`,`receiver_payment`,`real_payment`,`subsidy`,`real_subsidy`,`status`,`create_date`,`update_date`,freeze,type,source,card_spend_list_show
where 1 = 1
and `id` = #{id}
and `tenant_id` = #{tenantId}
and `parent_tenant_id` = #{parentTenantId}
and `order_id` = #{orderId}
and `order_type` = #{orderType}
and `merchant_id` = #{merchantId}
and `b_tenant_id` = #{bTenantId}
and `coupon_order_id` = #{couponOrderId}
and `coupon_type` = #{couponType}
and `order_payment` = #{orderPayment}
and `receiver_payment` = #{receiverPayment}
and `real_payment` = #{realPayment}
and `subsidy` = #{subsidy}
and `real_subsidy` = #{realSubsidy}
and `status` = #{status}
and `create_date` = #{createDate}
and `update_date` = #{updateDate}
and `create_date` between #{startdate} and #{enddate}
and `type` = #{type}
and `source` = #{source}
and `status` in
#{sItem}
and id in
#{idItem}
order by ${sortColumns}
delete from wx_merchant_subsidy where id = #{id} and tenant_id = #{tenantId}
update wx_merchant_subsidy
set `status` = #{status}
where 1=1
and `tenant_id` = #{tenantId}
and `parent_tenant_id` = #{parentTenantId}
and `merchant_id`=#{merchantId}
and `b_tenant_id` = #{bTenantId}
and id in
#{idItem}
ms.`id`,ms.`tenant_id`,ms.`parent_tenant_id`,ms.`order_id`,ms.`order_type`,ms.`merchant_id`,ms.`b_tenant_id`,ms.`coupon_order_id`,ms.`coupon_type`,
ms.`order_payment`,ms.`receiver_payment`,ms.`real_payment`,
ms.`subsidy`,ms.`real_subsidy`,ms.`status`,ms.`create_date`,ms.`update_date`,
c.`title`,c.`sub_title`,c.`unit`,m.`name`,
cu.`nick_name`, cu.`phone`,ms.freeze
and t.`id` = #{id}
and t.`tenant_id` = #{tenantId}
and t.`parent_tenant_id` = #{parentTenantId}
and t.`order_id` = #{orderId}
and t.`order_type` = #{orderType}
and t.`merchant_id` = #{merchantId}
and t.`b_tenant_id` = #{bTenantId}
and t.`coupon_order_id` = #{couponOrderId}
and t.`coupon_type` = #{couponType}
and t.`order_payment` = #{orderPayment}
and t.`receiver_payment` = #{receiverPayment}
and t.`real_payment` = #{realPayment}
and t.`subsidy` = #{subsidy}
and t.`real_subsidy` = #{realSubsidy}
and t.`status` = #{status}
and t.`create_date` = #{createDate}
and t.`update_date` = #{updateDate}
and t.`create_date` between #{startdate} and #{enddate}
and t.`title` like concat('%', #{title},'%')
and t.`status` in
#{sItem}
and t.`id` in
#{idItem}
order by ${sortColumns}