ProjectMattersDeclarationDao.xml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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.ProjectMattersDeclarationDao">
  4. <select id="findPageInfo" resultType="platform.modules.government.entity.ProjectMattersDeclaration">
  5. SELECT * FROM project_matters_declaration d
  6. INNER JOIN project_service_type t ON t.id = d.project_service_type and t.del_flag = 0
  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.ProjectMattersDeclaration">
  21. select * from project_matters_declaration where id = #{id}
  22. </select>
  23. <select id="findProvincesPageInfo" resultType="platform.modules.government.entity.ProjectMattersDeclaration">
  24. SELECT * FROM project_matters_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="selectByType" resultType="platform.modules.government.entity.ProjectMattersDeclaration">
  39. select * from project_matters_declaration where status = '1' and project_service_type = #{type}
  40. <if test="id != null and id != '' ">
  41. and id != #{id}
  42. </if>
  43. </select>
  44. <select id="findByProjectServerTypeId" resultType="platform.modules.government.entity.ProjectMattersDeclaration">
  45. select * from project_matters_declaration WHERE project_service_type=#{id};
  46. </select>
  47. </mapper>