Pārlūkot izejas kodu

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

tags/24080901
PoffyZhang pirms 1 gada
vecāks
revīzija
76168c65a5
1 mainītis faili ar 6 papildinājumiem un 1 dzēšanām
  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 Parādīt failu

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


Notiek ielāde…
Atcelt
Saglabāt