fix: 88501 法规符合性评估库--没有做数据权限

This commit is contained in:
2024-08-12 19:40:27 +08:00
parent 426f605c57
commit ced8c3f67c
2 changed files with 2 additions and 3 deletions
@@ -316,7 +316,7 @@ public class LawsConformityAssessmentLibraryServiceImpl extends ServiceImpl<Laws
@Override @Override
public boolean noAdminAuth() { public boolean noAdminAuth() {
LoginUser currentUser = UserUtils.getCurrentUser(); LoginUser currentUser = UserUtils.getCurrentUser();
return !Stream.of(currentUser.getRoleIds()).noneMatch(roleId -> roleId.equals(lawsAdmin) || roleId.equals(superAdmin)); return Stream.of(currentUser.getRoleIds()).noneMatch(roleId -> roleId.equals(lawsAdmin) || roleId.equals(superAdmin));
} }
} }
@@ -76,8 +76,7 @@ public class LawsEvaluationNotMetLibraryServiceImpl extends ServiceImpl<LawsEval
} }
if (calService.noAdminAuth()) { if (calService.noAdminAuth()) {
String userId = UserUtils.getUserId(); String userId = UserUtils.getUserId();
queryWrapper.like("nm.all_approval_user", userId); queryWrapper.like("nm.all_approval_user", userId).or().like("nm.assessor", userId);
queryWrapper.like("nm.assessor", userId);
} }
queryWrapper.orderByDesc("nm.create_time"); queryWrapper.orderByDesc("nm.create_time");
Page<LawsEvaluationNotMetLibrary> page = new Page<>(pageNo, pageSize); Page<LawsEvaluationNotMetLibrary> page = new Page<>(pageNo, pageSize);