feat(education): resolve student tenant context
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user