first commit
This commit is contained in:
@ -19,7 +19,6 @@ import com.qiaoba.common.redis.service.RedisService;
|
||||
import com.qiaoba.module.tenant.entity.SysTenant;
|
||||
import com.qiaoba.module.tenant.entity.SysTenantDatasource;
|
||||
import com.qiaoba.module.tenant.entity.param.SysTenantParam;
|
||||
import com.qiaoba.module.tenant.handler.DataHandlerFactory;
|
||||
import com.qiaoba.module.tenant.mapper.SysTenantMapper;
|
||||
import com.qiaoba.module.tenant.service.SysTenantDatasourceService;
|
||||
import com.qiaoba.module.tenant.service.SysTenantService;
|
||||
@ -112,12 +111,8 @@ public class SysTenantServiceImpl implements SysTenantService {
|
||||
if (Objects.isNull(sysTenant)) {
|
||||
throw new ServiceException("租户不存在");
|
||||
}
|
||||
// 初始化数据
|
||||
// 初始化数据 todo
|
||||
Connection connection = getConnection(sysTenant);
|
||||
boolean result = DataHandlerFactory.getHandler(connection.getMetaData().getDatabaseProductName().trim()).handle(connection, tenantId, !SysTenant.COLUMN_MODE.equals(sysTenant.getMode()));
|
||||
if (!result) {
|
||||
throw new ServiceException("同步数据出错, 数据已回滚");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user