!957 fix: CRM 管理员数据权限 bug

Merge pull request !957 from puhui999/develop
This commit is contained in:
芋道源码 2024-04-28 04:49:11 +00:00 committed by Gitee
commit e0652831a6
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -64,8 +64,10 @@ public class CrmPermissionUtils {
}
// 2.2 场景二我参与的数据
if (CrmSceneTypeEnum.isInvolved(sceneType)) {
query.ne(ownerUserIdField, userId)
.in(CrmPermissionDO::getLevel, CrmPermissionLevelEnum.READ.getLevel(), CrmPermissionLevelEnum.WRITE.getLevel());
query.innerJoin(CrmPermissionDO.class, on -> on.eq(CrmPermissionDO::getBizType, bizType)
.eq(CrmPermissionDO::getBizId, bizId)
.in(CrmPermissionDO::getLevel, CrmPermissionLevelEnum.READ.getLevel(), CrmPermissionLevelEnum.WRITE.getLevel()));
query.ne(ownerUserIdField, userId);
}
// 2.3 场景三下属负责的数据
if (CrmSceneTypeEnum.isSubordinate(sceneType)) {