|
@@ -13,18 +13,17 @@
|
|
|
from contract_manage
|
|
|
left join refund_manage on contract_manage.id = refund_manage.contract_id
|
|
|
<where>
|
|
|
- and contract_status = '2'
|
|
|
<if test="houseName != null and houseName != ''">
|
|
|
and house_name like concat('%',#{houseName},'%')
|
|
|
</if>
|
|
|
<if test="refundDateFrom != null and refundDateFrom != ''">
|
|
|
- and refund_manage.created_at >= #{refundDateFrom}
|
|
|
+ and date_format(refund_manage.created_at, '%Y-%m-%d') >= #{refundDateFrom}
|
|
|
</if>
|
|
|
<if test="refundDateTo != null and refundDateTo != ''">
|
|
|
- and refund_manage.created_at <= #{refundDateTo}
|
|
|
+ and date_format(refund_manage.created_at, '%Y-%m-%d') <= #{refundDateTo}
|
|
|
</if>
|
|
|
<if test="buyerName != null and buyerName != ''">
|
|
|
- and contract_manage.customer_management_id in (select customer_management_id from buyer where name like concat('%',#{buyerName},'%'))
|
|
|
+ and refund_manage.buyer_name concat('%',#{buyerName},'%')
|
|
|
</if>
|
|
|
<if test="applicant != null and applicant != ''">
|
|
|
and applicant like concat('%',#{applicant},'%')
|