find:()修改接口名称 优化方法
parent
c3c6606b02
commit
80bef9757c
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -139,16 +139,19 @@ public class DataRunNameServiceImpl implements DataRunNameService {
|
|||
// 调用assetImpowerService服务的findTableIdAndBasicIdByDeptId方法
|
||||
// 传入部门ID,获取该部门下所有授权的表ID和基础ID
|
||||
List<AssetAuthorization> 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> tableNames = this.dataDeptShow(tableIdAndBasicId, dataName);
|
||||
set.addAll(tableNames);
|
||||
}
|
||||
|
||||
});
|
||||
idByDeptId.forEach(tableIdAndBasicId -> {
|
||||
if (tableIdAndBasicId.getDeptId().equals(deptId)){
|
||||
if (tableIdAndBasicId.getDeptId().equals(intExact)){
|
||||
List<TableNames> tableNames = this.dataDeptShow(tableIdAndBasicId, dataName);
|
||||
set.addAll(tableNames);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue