ProjectFillingDeclarationDao.xml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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.ProjectFillingDeclarationDao">
  4. <select id="findPageInfo" resultType="platform.modules.government.entity.ProjectFillingDeclaration">
  5. SELECT * FROM project_filling_declaration d
  6. LEFT 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 d.project_type = #{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. <update id="updateForbiddenStateBatch" parameterType="java.lang.String">
  21. update project_filling_declaration
  22. <set>
  23. <if test="project.is_forbidden != null and project.is_forbidden != '' ">
  24. is_forbidden = #{project.is_forbidden},
  25. </if>
  26. </set>
  27. WHERE
  28. 1=1
  29. <if test="idList !=null and idList.size > 0 ">
  30. and id in
  31. <foreach collection="idList" open="(" close=")" separator="," item="id">
  32. #{id}
  33. </foreach>
  34. </if>
  35. </update>
  36. <select id="selectById" resultType="platform.modules.government.entity.ProjectFillingDeclaration">
  37. select * from project_filling_declaration where id = #{id}
  38. </select>
  39. <select id="findFillingPageInfo" resultType="platform.modules.government.entity.ProjectFillingDeclaration">
  40. SELECT * FROM project_filling_declaration d
  41. inner join project_service_type t on t.id = d.project_service_type and t.del_flag = 0
  42. where d.del_flag = 0 and d.status = 1 and d.is_forbidden = 1
  43. <if test="projectName != null and projectName != '' ">
  44. and d.project_name LIKE CONCAT ('%',#{projectName},'%')
  45. </if>
  46. <if test="projectType != null and projectType != '' ">
  47. and d.project_type = #{projectType}
  48. </if>
  49. <if test="projectSource != null and projectSource != '' ">
  50. and d.project_source = #{projectSource}
  51. </if>
  52. order by d.create_time desc
  53. </select>
  54. <select id="findAll" resultType="platform.modules.government.entity.ProjectFillingDeclaration">
  55. SELECT
  56. p.*
  57. FROM
  58. project_filling_declaration p
  59. inner join project_service_type t on p.project_service_type = t.id and t.del_flag = 0
  60. WHERE p.status = 1
  61. AND p.del_flag = 0
  62. <if test="searchCondition.begin_date != null and searchCondition.begin_date != ''">
  63. AND p.release_date <![CDATA[>=]]> #{searchCondition.begin_date}
  64. </if>
  65. <if test="searchCondition.end_date != null and searchCondition.end_date != ''">
  66. AND p.release_date <![CDATA[<=]]> #{searchCondition.end_date}
  67. </if>
  68. </select>
  69. </mapper>