From 80bef9757caaa6088243c5184c6e9ba00123d000 Mon Sep 17 00:00:00 2001 From: Yueng <14617246+YuengMeYuuer@user.noreply.gitee.com> Date: Sun, 8 Sep 2024 23:51:34 +0800 Subject: [PATCH] =?UTF-8?q?find:()=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=20=E4=BC=98=E5=8C=96=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/muyu/common/domain/AssetAuthorization.java | 10 +++++----- .../server/service/impl/DataRunNameServiceImpl.java | 7 +++++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/cloud-property-common/src/main/java/com/muyu/common/domain/AssetAuthorization.java b/cloud-property-common/src/main/java/com/muyu/common/domain/AssetAuthorization.java index d0db947..392ce46 100644 --- a/cloud-property-common/src/main/java/com/muyu/common/domain/AssetAuthorization.java +++ b/cloud-property-common/src/main/java/com/muyu/common/domain/AssetAuthorization.java @@ -26,21 +26,21 @@ public class AssetAuthorization { * 中间表主键 */ @TableId(type = IdType.AUTO) - private Long id; + private Integer id; /** * 表ID */ - private Long tableId; + private Integer tableId; /** * 部门ID */ - private Long deptId; + private Integer deptId; /** * 数据库ID */ - private Long basicId; + private Integer basicId; /** * 用户ID */ - private Long userId; + private Integer userId; } diff --git a/cloud-property-server/src/main/java/com/muyu/server/service/impl/DataRunNameServiceImpl.java b/cloud-property-server/src/main/java/com/muyu/server/service/impl/DataRunNameServiceImpl.java index 861e48e..fd220a9 100644 --- a/cloud-property-server/src/main/java/com/muyu/server/service/impl/DataRunNameServiceImpl.java +++ b/cloud-property-server/src/main/java/com/muyu/server/service/impl/DataRunNameServiceImpl.java @@ -139,16 +139,19 @@ public class DataRunNameServiceImpl implements DataRunNameService { // 调用assetImpowerService服务的findTableIdAndBasicIdByDeptId方法 // 传入部门ID,获取该部门下所有授权的表ID和基础ID List idByDeptId = dataRunNameMapper.findTableIdAndBasicIdByDeptId(deptId); + + int intExacts = Math.toIntExact(userId); + int intExact = Math.toIntExact(deptId); //在取数据数据遍历里获取表名称查询方法 tableIdAndBasicIdByUserId.forEach(tableIdAndBasicId -> { - if (tableIdAndBasicId.getUserId().equals(userId)){ + if (tableIdAndBasicId.getUserId().equals(intExacts)){ List tableNames = this.dataDeptShow(tableIdAndBasicId, dataName); set.addAll(tableNames); } }); idByDeptId.forEach(tableIdAndBasicId -> { - if (tableIdAndBasicId.getDeptId().equals(deptId)){ + if (tableIdAndBasicId.getDeptId().equals(intExact)){ List tableNames = this.dataDeptShow(tableIdAndBasicId, dataName); set.addAll(tableNames); }