You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.7 KiB

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.qniao.dam.infrastructure.persistent.dao.ora.OrderRefundApplicationDao">
<select id="pageMarriageBountyOrder"
resultType="com.qniao.dam.api.query.ora.user.response.UserPageMarriageBountyOrderRefundApplicationVo">
select
dora.id,
dora.order_id,
dmi.nick_name as miName,
daa.tid as phone,
dora.refund_order_type as refundOrderType,
dora.refund_amount,
dora.order_amount,
dora.`status`,
dora.create_time as applyTime
from da_order_refund_application as dora
LEFT JOIN da_marriage_bounty_order as dmbo on dmbo.id=dora.order_id
LEFT JOIN da_marriage_information as dmi on dmi.id=dmbo.mi_id
LEFT JOIN da_account as daa on daa.is_delete=0 and daa.type=2 and daa.user_id=dmbo.user_id
where dora.is_delete=0 and dora.refund_order_type=1
<if test="queryParams.status != null">
and dora.`status` = #{queryParams.status}
</if>
<if test="queryParams.miName != null and queryParams.miName != '' ">
AND dmi.nick_name LIKE CONCAT('%', TRIM(#{queryParams.miName}), '%')
</if>
<if test="queryParams.phone != null and queryParams.phone != '' ">
AND daa.tid LIKE CONCAT('%', TRIM(#{queryParams.phone}), '%')
</if>
<if test="queryParams.applyTimeFrom != null and queryParams.applyTimeTo != null">
and dora.create_time BETWEEN #{queryParams.applyTimeFrom} and #{queryParams.applyTimeTo}
</if>
</select>
</mapper>