123456789101112131415161718192021222324252627282930313233 |
- <?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.idea.paymentManagement.mapper.RefundManageExtendMapper">
- <select id="listByModel" resultType="com.idea.paymentManagement.dto.RefundManageDto">
- select contract_manage.id contractId,
- contract_manage.buyer_name,
- contract_manage.house_name,
- contract_manage.contract_number,
- contract_manage.customer_management_id,
- refund_manage.*
- from refund_manage
- left join contract_manage on contract_manage.id = refund_manage.contract_id
- <where>
- <if test="houseName != null and houseName != ''">
- and house_name like concat('%',#{houseName},'%')
- </if>
- <if test="refundDateFrom != null and refundDateFrom != ''">
- and date_format(refund_manage.created_at, '%Y-%m-%d') >= #{refundDateFrom}
- </if>
- <if test="refundDateTo != null and refundDateTo != ''">
- and date_format(refund_manage.created_at, '%Y-%m-%d') <= #{refundDateTo}
- </if>
- <if test="buyerName != null and buyerName != ''">
- and refund_manage.buyer_name concat('%',#{buyerName},'%')
- </if>
- <if test="applicant != null and applicant != ''">
- and applicant like concat('%',#{applicant},'%')
- </if>
- </where>
- </select>
- </mapper>
|