BlinkCompetitorRepositoryMapper.xml 1.3 KB

12345678910111213141516171819202122232425262728293031
  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.wx.blink.backend.repository.BlinkCompetitorRepository">
  4. <!-- 查询单个竞争对手-->
  5. <select id="queryByCompetitorName" resultType="com.wx.blink.backend.domain.dataobject.BlinkCompetitorDO">
  6. select *
  7. from blink_competitor
  8. where deleted_flag = #{deletedFlag}
  9. <if test="competitorName != null and competitorName != ''">
  10. AND competitor_name = #{competitorName}
  11. </if>
  12. <if test="id != null">
  13. AND id = #{id}
  14. </if>
  15. </select>
  16. <!-- 分页查询竞争对手列表-->
  17. <select id="supportsCompetitorQueryPage" resultType="com.wx.blink.backend.domain.dto.BlinkCompetitorDTO">
  18. select *
  19. from blink_competitor
  20. where deleted_flag = '0'
  21. <if test="query.competitorName != null and query.competitorName != ''">
  22. AND competitor_name LIKE concat('%', #{query.competitorName}, '%')
  23. </if>
  24. <if test="query.flatsType != null and query.flatsType != ''">
  25. AND flats_type LIKE concat('%', #{query.flatsType}, '%')
  26. </if>
  27. order by create_time desc
  28. </select>
  29. </mapper>