商户id
parent
6ce6a7a3fa
commit
8cfba0d856
|
@ -37,8 +37,8 @@ public class TenantContextHolder {
|
|||
public static Long getRequiredTenantId() {
|
||||
Long tenantId = getTenantId();
|
||||
if (tenantId == null) {
|
||||
throw new NullPointerException("TenantContextHolder 不存在租户编号!可参考文档:"
|
||||
+ DocumentEnum.TENANT.getUrl());
|
||||
throw new NullPointerException("商户id不存在"
|
||||
);
|
||||
}
|
||||
return tenantId;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import cn.hutool.core.util.IdUtil;
|
|||
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
||||
import cn.iocoder.yudao.module.infra.api.file.FileApi;
|
||||
import cn.iocoder.yudao.module.member.controller.admin.user.dto.AdminUserQueryDTO;
|
||||
import cn.iocoder.yudao.module.member.controller.app.user.vo.AppUserUpdateMobileReqVO;
|
||||
|
@ -104,6 +105,7 @@ public class MemberUserServiceImpl implements MemberUserService {
|
|||
user.setPassword(encodePassword("123456")); // 加密密码
|
||||
user.setRegisterIp(registerIp);
|
||||
user.setPromoterId(promoterId);
|
||||
user.setTenantId(TenantContextHolder.getRequiredTenantId());
|
||||
memberUserMapper.insert(user);
|
||||
return user;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue