CompareFilesMapper.xml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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="cn.cslg.report.mapper.CompareFilesMapper">
  4. <select id="patentNos">
  5. select DISTINCT PATENT_NO from COMPARE_FILES where
  6. <where>
  7. <if test="params.createName != '' and params.createName != null">
  8. and b.name like concat('%', #{params.createName}, '%')
  9. </if>
  10. <if test="params.status != null">
  11. and a.status = #{params.status}
  12. </if>
  13. <if test="params.type != null">
  14. and a.type = #{params.type}
  15. </if>
  16. <if test="params.projectId != null">
  17. and a.tid = #{params.projectId}
  18. </if>
  19. <if test="params.projectName != '' and params.projectName != null">
  20. and c.name like concat('%', #{params.projectName}, '%')
  21. </if>
  22. </where>
  23. order by a.ctime ${params.order}
  24. </select>
  25. <select id="selectedTotal" resultType="java.lang.Integer">
  26. select count(*) from COMPARE_FILES where REPORT_ID=#{id}
  27. </select>
  28. <select id="selectCompareFiles" resultType="cn.cslg.report.entity.CompareFiles">
  29. select * from COMPARE_FILES
  30. where REPORT_ID=#{reportId} and PATENT_NO=#{patentNo} and PATENT_FILED_ID=#{patentFiledID}
  31. and REMARK in
  32. <foreach collection="list" index="index" item="item" open="(" separator="," close=")">
  33. #{item}
  34. </foreach>
  35. </select>
  36. </mapper>