zouxuan há 5 anos atrás
pai
commit
2cb1612b94

+ 5 - 0
edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/impl/TenantInfoServiceImpl.java

@@ -107,6 +107,7 @@ public class TenantInfoServiceImpl extends BaseServiceImpl<Integer, TenantInfo>
 		if(Objects.nonNull(sysUser) && !newTenantInfo.getContactPhone().equals(sysUser.getPhone())){
 			throw new BizException("手机号已被占用");
 		}
+		Organization organization = organizationDao.findByUserId(sysUser.getId());
 		if(newTenantInfo.getRoleIds() != null){
 			//删除当前用户角色
 			sysUserDao.delEmployeeRole(sysUser.getId());
@@ -115,10 +116,14 @@ public class TenantInfoServiceImpl extends BaseServiceImpl<Integer, TenantInfo>
 		}
 		if(StringUtils.isNotBlank(newTenantInfo.getContactName())){
 			sysUser.setRealName(newTenantInfo.getContactName());
+			organization.setContactName(newTenantInfo.getContactName());
+			organization.setName(newTenantInfo.getName());
 		}
 		if(StringUtils.isNotBlank(newTenantInfo.getContactPhone())){
 			sysUser.setPhone(newTenantInfo.getContactPhone());
+			organization.setContactPhone(newTenantInfo.getContactPhone());
 		}
+		organizationDao.update(organization);
 		sysUserDao.update(sysUser);
 		imFeignService.update(new ImUserModel(sysUser.getId().toString(),sysUser.getRealName(),sysUser.getAvatar()));
 		tenantInfoDao.update(newTenantInfo);