feat(education): resolve student tenant context

This commit is contained in:
2026-07-27 17:32:36 +08:00
parent 11e9cc6854
commit 0f846fdaf5
16 changed files with 856 additions and 7 deletions

View File

@@ -1,6 +1,9 @@
package cn.iocoder.yudao.module.system.api.tenant;
import cn.iocoder.yudao.framework.common.biz.system.tenant.TenantCommonApi;
import cn.iocoder.yudao.framework.common.biz.system.tenant.dto.TenantRespDTO;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.system.dal.dataobject.tenant.TenantDO;
import cn.iocoder.yudao.module.system.service.tenant.TenantService;
import org.springframework.stereotype.Service;
@@ -28,4 +31,22 @@ public class TenantApiImpl implements TenantCommonApi {
tenantService.validTenant(id);
}
@Override
public TenantRespDTO getTenant(Long id) {
TenantDO tenant = tenantService.getTenant(id);
return tenant != null ? BeanUtils.toBean(tenant, TenantRespDTO.class) : null;
}
@Override
public TenantRespDTO getTenantByName(String name) {
TenantDO tenant = tenantService.getTenantByName(name);
return tenant != null ? BeanUtils.toBean(tenant, TenantRespDTO.class) : null;
}
@Override
public TenantRespDTO getTenantByWebsite(String website) {
TenantDO tenant = tenantService.getTenantByWebsite(website);
return tenant != null ? BeanUtils.toBean(tenant, TenantRespDTO.class) : null;
}
}