BlinkCompetitorProjectRepositoryMapper.xml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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.BlinkCompetitorProjectRepository">
  4. <!-- 查询单个企业资质-->
  5. <select id="queryByProjectName" resultType="com.wx.blink.backend.domain.dataobject.BlinkCompetitorProjectDO">
  6. select *
  7. from blink_competitor_project_situation
  8. where deleted_flag = #{deletedFlag}
  9. <if test="projectName != null and projectName != ''">
  10. AND project_name = #{projectName}
  11. </if>
  12. <if test="id != null">
  13. AND id = #{id}
  14. </if>
  15. </select>
  16. <!-- 分页查询企业资质列表-->
  17. <select id="supportsCompetitorProjectQueryPage" resultType="com.wx.blink.backend.domain.dto.BlinkCompetitorProjectDTO">
  18. select *
  19. from blink_competitor_project_situation
  20. where deleted_flag = '0'
  21. <if test="query.projectName != null and query.qualificationprojectName != ''">
  22. AND project_name LIKE concat('%', #{query.projectName}, '%')
  23. </if>
  24. <!-- <if test="query.competitorId != null">-->
  25. <!-- AND competitor_id = #{query.competitorId}-->
  26. <!-- </if>-->
  27. order by create_time desc
  28. </select>
  29. <select id="supportsCompetitorProjectQtyByCompetitorId" resultType="java.lang.Integer">
  30. select COUNT(1) cnt
  31. from blink_competitor_project_situation
  32. where deleted_flag = 0
  33. -- and competitor_id=#{competitorId}
  34. </select>
  35. <select id="supportsCompetitorProjectByCompetitorIdQueryPage"
  36. resultType="com.wx.blink.backend.domain.dto.BlinkCompetitorProjectDTO">
  37. select si.*
  38. from blink_competitor_project_situation si
  39. inner join blink_competitor_project_situation_offer offer
  40. on si.id=offer.situation_id and offer.deleted_flag = 0
  41. where si.deleted_flag = 0
  42. <if test="query.competitorId != null">
  43. and offer.competitor_id = #{query.competitorId}
  44. </if>
  45. <if test="query.projectName != null and query.projectName != ''">
  46. and si.project_name LIKE concat('%', #{query.projectName}, '%')
  47. </if>
  48. <if test="query.customerName != null and query.customerName != ''">
  49. and si.customer_name LIKE concat('%', #{query.customerName}, '%')
  50. </if>
  51. <if test="query.isOffer != null">
  52. and si.is_offer = #{query.isOffer}
  53. </if>
  54. <if test="query.isAward != null">
  55. and si.is_award = #{query.isAward}
  56. </if>
  57. </select>
  58. <select id="getById"
  59. resultType="com.wx.blink.backend.domain.dataobject.BlinkCompetitorProjectDO">
  60. select *
  61. from blink_competitor_project_situation
  62. where deleted_flag = 0
  63. and id = #{id}
  64. </select>
  65. </mapper>