PatentSimpleFamilyLinkMapper.xml 921 B

1234567891011121314151617181920212223
  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.pas.mapper.PatentSimpleFamilyLinkMapper">
  4. <select id="getPatentFamilyLinkByPatentNo" resultType="cn.cslg.pas.domain.PatentSimpleFamilyLink">
  5. select a.* from os_patent_simplefamily_link a
  6. left join os_patent_simplefamily b on a.family_id=b.id
  7. where
  8. b.type = #{type}
  9. and a.patent_no in
  10. <foreach collection="patentNos" item="id" open="(" separator="," close=")">
  11. #{id}
  12. </foreach>
  13. </select>
  14. <select id="getDirtyData" resultType="cn.cslg.pas.domain.PatentSimpleFamily">
  15. select *, count(*) as count
  16. from os_patent_simplefamily
  17. where type = #{type}
  18. group by patent_no
  19. having count(*) > 1
  20. limit 10000
  21. </select>
  22. </mapper>