|
@@ -458,17 +458,15 @@ public class EnterpriseUserBindServiceImpl implements EnterpriseUserBindService
|
|
}
|
|
}
|
|
|
|
|
|
private EnterpriseUserBindDO valid(Long id) {
|
|
private EnterpriseUserBindDO valid(Long id) {
|
|
- LoginUser loginUser = checkIsEnterpriseUser();
|
|
|
|
|
|
|
|
// 查找操作的目标用户
|
|
// 查找操作的目标用户
|
|
EnterpriseUserBindDO userBindDO = mapper
|
|
EnterpriseUserBindDO userBindDO = mapper
|
|
- .selectByEnterpriseIdAndId(
|
|
|
|
- LoginUserContext.getEnterpriseId(loginUser), id);
|
|
|
|
|
|
+ .selectById(id);
|
|
|
|
|
|
if (null == userBindDO) {
|
|
if (null == userBindDO) {
|
|
throw exception(MDE_ENTERPRISE_USER_BIND_NOT_EXISTS);
|
|
throw exception(MDE_ENTERPRISE_USER_BIND_NOT_EXISTS);
|
|
}
|
|
}
|
|
- if (userBindDO.getUserId().equals(loginUser.getId())) {
|
|
|
|
|
|
+ if (userBindDO.getUserId().equals(id)) {
|
|
throw exception(MDE_ENTERPRISE_USER_BIND_IS_ADMIN);
|
|
throw exception(MDE_ENTERPRISE_USER_BIND_IS_ADMIN);
|
|
}
|
|
}
|
|
return userBindDO;
|
|
return userBindDO;
|