1234567891011121314151617181920212223242526272829 |
- <?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.customerManagement.mapper.ContractManageExtendMapper">
- <select id="listByModel" resultType="com.idea.customerManagement.dto.ContractManageDto">
- select * from contract_manage
- <where>
- <!-- <if test="buyerName != null and buyerName != ''">
- and buyer_name like concat('%',#{buyerName},'%')
- </if> -->
- <if test="houseName != null and houseName != ''">
- and house_name like concat('%',#{houseName},'%')
- </if>
- <if test="contractStatus != null and contractStatus != ''">
- and contract_status = #{contractStatus}
- </if>
- <if test="signingDateFrom != null and signingDateFrom != ''">
- and signing_date >= #{signingDateFrom}
- </if>
- <if test="signingDateTo != null and signingDateTo != ''">
- and signing_date <= #{signingDateTo}
- </if>
- <if test="buyerName != null and buyerName != ''">
- and customer_management_id in (select customer_management_id from buyer where name like concat('%',#{buyerName},'%'))
- </if>
- </where>
- order by created_at desc,updated_at desc
- </select>
- </mapper>
|