|
|
@@ -333,10 +333,15 @@ public class NoticeManage { |
|
|
|
} |
|
|
|
|
|
|
|
private void permissionsWrapperByEdit(LambdaQueryWrapper<Notice> wrapper,UserFullInfoDTO user) { |
|
|
|
UserInfoDetails userInfoDetails = LoginUserUtil.loginUserDetail(); |
|
|
|
//如果是超管 就能看所有 |
|
|
|
if(user.getSuperAdmin()){ |
|
|
|
log.info(user.getUsername() + ",超管可以看所有"); |
|
|
|
}else if(user.getRegionAdmin()){ |
|
|
|
wrapper.eq(Notice::getPermissions,NoticePermissionsEnum.REGION.getCode()) |
|
|
|
.eq(Notice::getPermissionsValue,user.getRegionCode()); |
|
|
|
}else if(user.getIsOrgAdmin()){ |
|
|
|
wrapper.eq(Notice::getPermissions,NoticePermissionsEnum.ORG.getCode()) |
|
|
|
.eq(Notice::getPermissionsValue,user.getEmpPosUnitCode()); |
|
|
|
}else{ |
|
|
|
wrapper.eq(Notice::getCreateOn,user.getUserId()); |
|
|
|
} |
|
|
|