浏览代码

Merge remote-tracking branch 'origin/dev2' into dev2

chendayu 2 年之前
父节点
当前提交
405fe8079d

+ 1 - 1
PAS/src/main/java/cn/cslg/pas/controller/PermissionRecordController.java

@@ -76,7 +76,7 @@ public class PermissionRecordController {
         pageHelperT.setList(queryResult);
         pageHelperT.setCurrent(queryPREntity.getCurrent());
         pageHelperT.setSize(queryPREntity.getSize());
-        pageHelperT.setTotal(permissionRecordMapper.countByPatentNo(queryPREntity.getPatentNo()));
+        pageHelperT.setTotal(permissionRecordService.countByPatentNo(queryPREntity.getPatentNo()));
         return Response.success(pageHelperT);
     }
 }

+ 1 - 1
PAS/src/main/java/cn/cslg/pas/mapper/PermissionRecordMapper.java

@@ -36,7 +36,7 @@ public interface PermissionRecordMapper {
      * @param patentNo 专利号
      * @return 返回统计到的总数量total
      */
-    int countByPatentNo(String patentNo);
+    int countByPatentNo(String patentNo,  Integer tenantId);
 
 
     /**

+ 7 - 0
PAS/src/main/java/cn/cslg/pas/service/IPermissionRecordService.java

@@ -49,6 +49,13 @@ public interface IPermissionRecordService {
      */
     List<PermissionRecordVO> queryAllInfo(String patentNo);
 
+    /**
+     *
+     * @param patentNo
+     * @return
+     */
+    Integer countByPatentNo(String patentNo);
+
 
     /**
      * 根据许可id删除许可记录数据

+ 7 - 0
PAS/src/main/java/cn/cslg/pas/service/impl/PermissionRecordServiceImpl.java

@@ -110,6 +110,13 @@ public class PermissionRecordServiceImpl implements IPermissionRecordService {
         return lists;
     }
 
+    @Override
+    public Integer countByPatentNo(String patentNo){
+        PersonnelVO personnelVO = cacheUtils.getLoginUser(loginUtils.getId());
+        Integer tenantId = personnelVO.getTenantId();
+        return  permissionRecordMapper.countByPatentNo(patentNo,tenantId);
+    }
+
 
     /**
      * 根据id删除许可记录数据

+ 1 - 0
PAS/src/main/resources/mapper/PermissionRecordMapper.xml

@@ -99,6 +99,7 @@
         select count(*)
         from permission_record
         where patent_No = #{patentNo}
+          and tenant_id = #{tenantId}
     </select>