Bladeren bron

公告 只能编辑自己的 超管除外

tags/24080901
PoffyZhang 1 jaar geleden
bovenliggende
commit
76168c65a5
1 gewijzigde bestanden met toevoegingen van 6 en 1 verwijderingen
  1. +6
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/NoticeManage.java

+ 6
- 1
pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/NoticeManage.java Bestand weergeven

@@ -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());
}


Laden…
Annuleren
Opslaan