Fix oracle datatype error

This commit is contained in:
SwallowGG
2023-11-15 18:32:04 +08:00
parent fc6f7aa547
commit 5b126a38f0
5 changed files with 64 additions and 30 deletions

View File

@ -73,19 +73,19 @@ public class RdbDdlController extends EmbeddingController {
PageResult<Table> tableDTOPageResult = tableService.pageQuery(queryParam, tableSelector);
List<TableVO> tableVOS = rdbWebConverter.tableDto2vo(tableDTOPageResult.getData());
ConnectInfo connectInfo = Chat2DBContext.getConnectInfo();
singleThreadExecutor.submit(() -> {
try {
Chat2DBContext.putContext(connectInfo);
syncTableVector(request);
// syncTableEs(request);
} catch (Exception e) {
log.error("sync table vector error", e);
} finally {
Chat2DBContext.removeContext();
}
log.info("sync table vector finish");
});
// ConnectInfo connectInfo = Chat2DBContext.getConnectInfo();
// singleThreadExecutor.submit(() -> {
// try {
// Chat2DBContext.putContext(connectInfo);
// syncTableVector(request);
//// syncTableEs(request);
// } catch (Exception e) {
// log.error("sync table vector error", e);
// } finally {
// Chat2DBContext.removeContext();
// }
// log.info("sync table vector finish");
// });
return WebPageResult.of(tableVOS, tableDTOPageResult.getTotal(), request.getPageNo(),
request.getPageSize());
}

View File

@ -64,19 +64,19 @@ public class TableController extends EmbeddingController {
tableSelector.setIndexList(false);
PageResult<Table> tableDTOPageResult = tableService.pageQuery(queryParam, tableSelector);
List<TableVO> tableVOS = rdbWebConverter.tableDto2vo(tableDTOPageResult.getData());
ConnectInfo connectInfo = Chat2DBContext.getConnectInfo();
singleThreadExecutor.submit(() -> {
try {
Chat2DBContext.putContext(connectInfo);
syncTableVector(request);
// syncTableEs(request);
} catch (Exception e) {
log.error("sync table vector error", e);
} finally {
Chat2DBContext.removeContext();
}
log.info("sync table vector finish");
});
// ConnectInfo connectInfo = Chat2DBContext.getConnectInfo();
// singleThreadExecutor.submit(() -> {
// try {
// Chat2DBContext.putContext(connectInfo);
// syncTableVector(request);
//// syncTableEs(request);
// } catch (Exception e) {
// log.error("sync table vector error", e);
// } finally {
// Chat2DBContext.removeContext();
// }
// log.info("sync table vector finish");
// });
return WebPageResult.of(tableVOS, tableDTOPageResult.getTotal(), request.getPageNo(),
request.getPageSize());
}