diff --git a/dl-module-company/src/main/java/cn/iocoder/yudao/module/staff/service/impl/CompanyStaffServiceImpl.java b/dl-module-company/src/main/java/cn/iocoder/yudao/module/staff/service/impl/CompanyStaffServiceImpl.java index ad0657da..9d3e9845 100644 --- a/dl-module-company/src/main/java/cn/iocoder/yudao/module/staff/service/impl/CompanyStaffServiceImpl.java +++ b/dl-module-company/src/main/java/cn/iocoder/yudao/module/staff/service/impl/CompanyStaffServiceImpl.java @@ -222,6 +222,8 @@ public class CompanyStaffServiceImpl extends ServiceImpl roleIdes = staffRespVO.getRoleIds().stream().collect(Collectors.toSet()); permissionApi.assignUserRoleByRoleIds(staffRespVO.getUserId(), roleIdes); + }else { + permissionApi.assignUserRoleByRoleIds(staffRespVO.getUserId(), null); } /* 修改员工表 */