1.租户到期时间查询

This commit is contained in:
2025-08-25 14:28:17 +08:00
parent 061711a9c0
commit 3f1c4df78a
6 changed files with 48 additions and 4 deletions

View File

@@ -1,9 +1,11 @@
package com.yupi.springbootinit.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yupi.springbootinit.common.BaseResponse;
import com.yupi.springbootinit.common.ErrorCode;
import com.yupi.springbootinit.exception.BusinessException;
import com.yupi.springbootinit.model.vo.user.SystemTenantVO;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
@@ -11,6 +13,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yupi.springbootinit.model.entity.SystemTenant;
import com.yupi.springbootinit.mapper.SystemTenantMapper;
import com.yupi.springbootinit.service.SystemTenantService;
import javax.annotation.Resource;
/*
* @author: ziin
* @date: 2025/6/20 14:50
@@ -19,6 +23,9 @@ import com.yupi.springbootinit.service.SystemTenantService;
@Service
public class SystemTenantServiceImpl extends ServiceImpl<SystemTenantMapper, SystemTenant> implements SystemTenantService{
@Resource
private SystemTenantMapper systemTenantMapper;
@Override
public Long getTenantIdByName(String name) {
QueryWrapper<SystemTenant> queryWrapper = new QueryWrapper<>();
@@ -31,4 +38,12 @@ public class SystemTenantServiceImpl extends ServiceImpl<SystemTenantMapper, Sys
return systemTenant.getId();
}
@Override
public SystemTenantVO getTenantIdExpired(Long tenantId) {
SystemTenant systemTenant = systemTenantMapper.selectById(tenantId);
SystemTenantVO systemTenantVO = new SystemTenantVO();
systemTenantVO.setExpiredTime(systemTenant.getExpireTime());
return systemTenantVO;
}
}