add
This commit is contained in:
@ -11,6 +11,8 @@
|
||||
|
||||
<artifactId>qiaoba-module-tenant</artifactId>
|
||||
|
||||
<description>租户模块</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.qiaoba</groupId>
|
||||
|
@ -8,6 +8,13 @@ import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 项目启动完成后-将主库中的租户信息同步到 Redis 中
|
||||
*
|
||||
* @author ailanyin
|
||||
* @version 1.0
|
||||
* @since 2022-09-22 04:20:28
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class SysTenantRunner implements ApplicationRunner {
|
||||
|
@ -72,7 +72,7 @@ public interface SysTenantDatasourceService {
|
||||
/**
|
||||
* 将租户下的除datasourceId之外的其他数据源设置为备用
|
||||
*
|
||||
* @param tenantId tenantId
|
||||
* @param tenantId tenantId
|
||||
* @param excludeId 排除Id
|
||||
*/
|
||||
void setBackupDatasourceExcludeId(String tenantId, String excludeId);
|
||||
|
@ -4,9 +4,6 @@ import com.qiaoba.common.database.entity.PageQuery;
|
||||
import com.qiaoba.common.database.entity.TableDataInfo;
|
||||
import com.qiaoba.module.tenant.entity.SysTenant;
|
||||
import com.qiaoba.module.tenant.entity.param.SysTenantParam;
|
||||
import com.qiaoba.module.tenant.entity.vo.TenantSettingVo;
|
||||
|
||||
import java.sql.Connection;
|
||||
|
||||
/**
|
||||
* 租户管理 服务层
|
||||
|
@ -62,7 +62,7 @@ public class SysTenantDatasourceServiceImpl implements SysTenantDatasourceServic
|
||||
|
||||
@Override
|
||||
public void setBackupDatasourceExcludeId(String tenantId, String excludeId) {
|
||||
sysTenantDatasourceMapper.setBackupDatasourceExcludeId(tenantId,excludeId,BaseEnum.NO.getCode());
|
||||
sysTenantDatasourceMapper.setBackupDatasourceExcludeId(tenantId, excludeId, BaseEnum.NO.getCode());
|
||||
}
|
||||
|
||||
private QueryWrapper<SysTenantDatasource> paramToWrapper(SysTenantDatasourceParam param) {
|
||||
|
Reference in New Issue
Block a user