mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 15:21:53 +08:00
【BUG】添加租户时,租户id没有保存的问题
This commit is contained in:
parent
60ab3389f5
commit
d0b60bf9b4
@ -11,6 +11,7 @@ import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.common.util.validation.ValidationUtils;
|
||||
import cn.iocoder.yudao.framework.datapermission.core.util.DataPermissionUtils;
|
||||
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
||||
import cn.iocoder.yudao.module.infra.api.config.ConfigApi;
|
||||
import cn.iocoder.yudao.module.infra.api.file.FileApi;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.auth.vo.AuthRegisterReqVO;
|
||||
@ -104,6 +105,7 @@ public class AdminUserServiceImpl implements AdminUserService {
|
||||
AdminUserDO user = BeanUtils.toBean(createReqVO, AdminUserDO.class);
|
||||
user.setStatus(CommonStatusEnum.ENABLE.getStatus()); // 默认开启
|
||||
user.setPassword(encodePassword(createReqVO.getPassword())); // 加密密码
|
||||
user.setTenantId(TenantContextHolder.getRequiredTenantId());
|
||||
userMapper.insert(user);
|
||||
// 2.2 插入关联岗位
|
||||
if (CollectionUtil.isNotEmpty(user.getPostIds())) {
|
||||
|
Loading…
Reference in New Issue
Block a user