Преглед изворни кода

查询专利详情更新 2022/12/9

lwhhszx пре 2 година
родитељ
комит
9e62b3d5ee

+ 3 - 1
PAS/src/main/java/cn/cslg/pas/service/PatentService.java

@@ -1399,9 +1399,11 @@ public String getComPantentNos(PatentVO params){
     }
     public  String getPagination(List<String> list,int location){
         Map map=new HashMap();
+        Integer totalNumber= 0;
+        if(list.size()!=0){
         LambdaQueryWrapper<Patent> wrapper =new LambdaQueryWrapper<>();
         wrapper.in(Patent::getPatentNo,list);
-        Integer totalNumber = Math.toIntExact(this.count(wrapper));
+         totalNumber = Math.toIntExact(this.count(wrapper));}
         if(location>=totalNumber){
             location=totalNumber;
             int a=location-2;

+ 6 - 1
PAS/src/main/resources/mapper/PatentMapper.xml

@@ -1484,13 +1484,18 @@
         a.agencyid as agency_id, a.num2 as right_num, a.quoteno as quote_num, a.quotedno as quoted_num,
         a.patsnap_family as patSnapFamily, a.patsnapfamilynum as patSnapFamilyNum
         from os_patent a
-        where patentno in
+        <where> patentno="0"
+        <if test="patentNo != null and patentNo.size!=0">
+             or patentno in
         <foreach item="item" collection="patentNo" index="index" open="(" separator="," close=")">
             #{item}
         </foreach>
+
+        </if>
         <if test="n!=-1 and p!=-1">
             limit #{n},#{p}
         </if>
+        </where>
     </select>
     <!--    int getPatentNumber(@Param("patentNo")List<String> patentNo);-->
     <select id="getPatentNumber" resultType="java.lang.Integer">