mirror of
https://github.com/CodePhiliaX/Chat2DB.git
synced 2025-07-31 19:52:54 +08:00
Merge remote-tracking branch 'origin/developing' into team
This commit is contained in:
@ -2,6 +2,7 @@ package ai.chat2db.server.web.api.controller.ai;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import ai.chat2db.server.domain.api.enums.AiSqlSourceEnum;
|
||||
import ai.chat2db.server.domain.api.model.Config;
|
||||
import ai.chat2db.server.domain.api.param.SystemConfigParam;
|
||||
import ai.chat2db.server.domain.api.service.ConfigService;
|
||||
@ -9,6 +10,7 @@ import ai.chat2db.server.tools.base.wrapper.result.DataResult;
|
||||
import ai.chat2db.server.tools.common.config.Chat2dbProperties;
|
||||
import ai.chat2db.server.web.api.aspect.ConnectionInfoAspect;
|
||||
import ai.chat2db.server.web.api.controller.ai.chat2db.client.Chat2dbAIClient;
|
||||
import ai.chat2db.server.web.api.controller.ai.rest.client.RestAIClient;
|
||||
import ai.chat2db.server.web.api.http.GatewayClientService;
|
||||
import ai.chat2db.server.web.api.http.response.ApiKeyResponse;
|
||||
import ai.chat2db.server.web.api.http.response.InviteQrCodeResponse;
|
||||
@ -64,6 +66,9 @@ public class AiConfigController {
|
||||
QrCodeResponse qrCodeResponse = dataResult.getData();
|
||||
// Representative successfully logged in
|
||||
if (StringUtils.isNotBlank(qrCodeResponse.getApiKey())) {
|
||||
SystemConfigParam sqlSourceParam = SystemConfigParam.builder().code(RestAIClient.AI_SQL_SOURCE)
|
||||
.content(AiSqlSourceEnum.CHAT2DBAI.getCode()).build();
|
||||
configService.createOrUpdate(sqlSourceParam);
|
||||
SystemConfigParam param = SystemConfigParam.builder()
|
||||
.code(Chat2dbAIClient.CHAT2DB_OPENAI_KEY).content(qrCodeResponse.getApiKey())
|
||||
.build();
|
||||
|
@ -118,6 +118,7 @@ public class RdbDmlExportController {
|
||||
ExcelWrapper excelWrapper = new ExcelWrapper();
|
||||
try {
|
||||
ExcelWriterBuilder excelWriterBuilder = EasyExcel.write(response.getOutputStream())
|
||||
.charset(StandardCharsets.UTF_8)
|
||||
.excelType(ExcelTypeEnum.CSV);
|
||||
excelWrapper.setExcelWriterBuilder(excelWriterBuilder);
|
||||
SQLExecutor.getInstance().executeSql(Chat2DBContext.getConnection(), sql, headerList -> {
|
||||
|
@ -38,6 +38,11 @@ public class ExecuteResultVO {
|
||||
*/
|
||||
private Boolean success;
|
||||
|
||||
/**
|
||||
* 修改行数 查询sql不会返回
|
||||
*/
|
||||
private Integer updateCount;
|
||||
|
||||
/**
|
||||
* 展示头的列表
|
||||
*/
|
||||
|
Reference in New Issue
Block a user