ContractManageExtendMapper.xml 1.4 KB

1234567891011121314151617181920212223242526272829
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.idea.customerManagement.mapper.ContractManageExtendMapper">
  4. <select id="listByModel" resultType="com.idea.customerManagement.dto.ContractManageDto">
  5. select * from contract_manage
  6. <where>
  7. <!-- <if test="buyerName != null and buyerName != ''">
  8. and buyer_name like concat('%',#{buyerName},'%')
  9. </if> -->
  10. <if test="houseName != null and houseName != ''">
  11. and house_name like concat('%',#{houseName},'%')
  12. </if>
  13. <if test="contractStatus != null and contractStatus != ''">
  14. and contract_status = #{contractStatus}
  15. </if>
  16. <if test="signingDateFrom != null and signingDateFrom != ''">
  17. and signing_date >= #{signingDateFrom}
  18. </if>
  19. <if test="signingDateTo != null and signingDateTo != ''">
  20. and signing_date &lt;= #{signingDateTo}
  21. </if>
  22. <if test="buyerName != null and buyerName != ''">
  23. and customer_management_id in (select customer_management_id from buyer where name like concat('%',#{buyerName},'%'))
  24. </if>
  25. </where>
  26. order by created_at desc,updated_at desc
  27. </select>
  28. </mapper>