提交 8804a9b7 编写于 作者: wenhao.qin's avatar wenhao.qin

补充上次

上级 b58f5320
流水线 #43142 已取消 于阶段
......@@ -197,11 +197,11 @@ public class HospitalSaasUserServiceImpl implements HospitalSaasUserService {
if (accountExist == null) {
throw new PicaException(PicaResultCode.PARAM_IS_INVALID.code(), "当前用户不存在");
}
PermissionDoctorRole doctorRole = doctorRoleMapper.selectByUserId(req.getId());
if (req.getLoginFlag() == 1 && Objects.nonNull(doctorRole) && !Objects.equals(req.getRoleId(), doctorRole.getRoleId()) && req.getRoleId() != 0 && doctorRole.getRoleId() < SaasRoleEnum.SAAS_MAIN_ADMIN.getCode()) {
HospitalSaasUserEditResp resp = accountMapper.selectUserRoleById(req.getId());
if (req.getLoginFlag() == 1 && Objects.nonNull(resp) && !Objects.equals(req.getRoleId(), resp.getRoleId()) && req.getRoleId() != 0 && resp.getRoleId() < SaasRoleEnum.SAAS_MAIN_ADMIN.getCode()) {
throw new PicaException(PicaResultCode.PARAM_IS_INVALID.code(), "当前角色不可编辑");
}
if (req.getLoginFlag() == 0 && Objects.nonNull(doctorRole) &&!Objects.equals(req.getRoleId(), doctorRole.getRoleId()) && req.getRoleId() != 0 && doctorRole.getRoleId() < SaasRoleEnum.SAAS_DOCTOR.getCode()) {
if (req.getLoginFlag() == 0 && Objects.nonNull(resp) &&!Objects.equals(req.getRoleId(), resp.getRoleId()) && req.getRoleId() != 0 && resp.getRoleId() < SaasRoleEnum.SAAS_DOCTOR.getCode()) {
throw new PicaException(PicaResultCode.PARAM_IS_INVALID.code(), "当前角色不可编辑");
}
Account account = new Account();
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册