ProjectProvincesDeclarationDao.xml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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="platform.modules.government.dao.ProjectProvincesDeclarationDao">
  4. <select id="findPageInfo" resultType="platform.modules.government.entity.ProjectProvincesDeclaration">
  5. SELECT * FROM project_provinces_declaration d
  6. LEFT JOIN project_service_type t ON t.id = d.project_service_type
  7. WHERE 1=1
  8. AND d.del_flag = 0
  9. <if test="projectName != null and projectName != '' ">
  10. AND d.project_name LIKE CONCAT ('%',#{projectName},'%')
  11. </if>
  12. <if test="projectType != null and projectType != '' ">
  13. AND t.service_type_name LIKE CONCAT ('%',#{projectType},'%')
  14. </if>
  15. <if test="projectSource != null and projectSource != '' ">
  16. AND d.project_source = #{projectSource}
  17. </if>
  18. ORDER BY d.create_time DESC
  19. </select>
  20. <select id="selectById" resultType="platform.modules.government.entity.ProjectProvincesDeclaration">
  21. select * from project_provinces_declaration where id = #{id}
  22. </select>
  23. <select id="findProvincesPageInfo" resultType="platform.modules.government.entity.ProjectProvincesDeclaration">
  24. SELECT * FROM project_provinces_declaration d
  25. inner JOIN project_service_type t ON t.id = d.project_service_type and t.del_flag = 0
  26. where d.del_flag = 0 and d.status = 1
  27. <if test="projectName != null and projectName != '' ">
  28. AND d.project_name LIKE CONCAT ('%',#{projectName},'%')
  29. </if>
  30. <if test="projectType != null and projectType != '' ">
  31. AND t.service_type_name LIKE CONCAT ('%',#{projectType},'%')
  32. </if>
  33. <if test="projectSource != null and projectSource != '' ">
  34. AND d.project_source = #{projectSource}
  35. </if>
  36. ORDER BY d.create_time DESC
  37. </select>
  38. <select id="findAll" resultType="platform.modules.government.entity.ProjectProvincesDeclaration">
  39. SELECT
  40. p.*
  41. FROM
  42. project_provinces_declaration p
  43. inner join project_service_type t on p.project_service_type = t.id and t.del_flag = 0
  44. WHERE p.status = 1
  45. <if test="searchCondition.begin_date != null and searchCondition.begin_date != ''">
  46. AND p.release_date <![CDATA[>=]]> #{searchCondition.begin_date}
  47. </if>
  48. <if test="searchCondition.end_date != null and searchCondition.end_date != ''">
  49. AND p.release_date <![CDATA[<=]]> #{searchCondition.end_date}
  50. </if>
  51. </select>
  52. </mapper>