BsSupervisionAll.xml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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.bizmatics.mhfire.persistence.mapper.BsSupervisionAllMapper">
  4. <select id="selectCount" resultType="java.lang.Integer">
  5. select count(1)
  6. from `jbzb-jdglxm-all`
  7. <where>
  8. <if test="typeOneLetter != null and typeOneLetter != ''">
  9. and `项目分类型一` = #{typeOneLetter}
  10. </if>
  11. <if test="typeTwoLetter != null and typeTwoLetter != ''">
  12. and `项目分类型二` = #{typeTwoLetter}
  13. </if>
  14. <if test="startTime != null">
  15. and `项目创建日期` >= #{startTime}
  16. </if>
  17. <if test="endTime != null">
  18. and `项目创建日期` &lt;= #{endTime}
  19. </if>
  20. <if test="unitId != null and unitId != ''">
  21. and `项目单位ID` = #{unitId}
  22. </if>
  23. </where>
  24. </select>
  25. <select id="selectByRecentlyOne" resultType="java.util.Map">
  26. select *
  27. from `jbzb-jdglxm-all`
  28. <where>
  29. <if test="typeOneLetter != null and typeOneLetter != ''">
  30. and `项目分类型一` = #{typeOneLetter}
  31. </if>
  32. <if test="typeTwoLetter != null and typeTwoLetter != ''">
  33. and `项目分类型二` = #{typeTwoLetter}
  34. </if>
  35. </where>
  36. limit 0,1
  37. </select>
  38. </mapper>