dev:相关方端创建默认通用角色提示

main
SondonYong 2025-12-09 15:30:42 +08:00
parent dedfa79179
commit 6c4eea5054
1 changed files with 7 additions and 0 deletions

View File

@ -269,6 +269,13 @@ public class UserAddExe {
BeanUtils.copyProperties(cmd, userE);
userE.initAdd(tenantId, userE);
CorpInfoDO corpInfoDO = corpInfoRepository.getById(userE.getCorpinfoId());
Long roleId = userRepository.getDefaultRoleId();
if (roleId == null){
throw new BizException("未创建默认通用角色,请联系管理员");
}
userE.setRoleId(roleId);
boolean res = false;
try {
res = userGateway.addXgf(userE);