mirror of
https://github.com/CodePhiliaX/Chat2DB.git
synced 2025-07-31 11:42:41 +08:00
Fix operation log bug
This commit is contained in:
@ -343,21 +343,21 @@ public class DlTemplateServiceImpl implements DlTemplateService {
|
|||||||
.append(" (");
|
.append(" (");
|
||||||
for (int i = 1; i < row.size(); i++) {
|
for (int i = 1; i < row.size(); i++) {
|
||||||
Header header = param.getHeaderList().get(i);
|
Header header = param.getHeaderList().get(i);
|
||||||
String newValue = row.get(i);
|
//String newValue = row.get(i);
|
||||||
if (newValue != null) {
|
//if (newValue != null) {
|
||||||
script.append(metaSchema.getMetaDataName(header.getName()))
|
script.append(metaSchema.getMetaDataName(header.getName()))
|
||||||
.append(",");
|
.append(",");
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
script.deleteCharAt(script.length() - 1);
|
script.deleteCharAt(script.length() - 1);
|
||||||
script.append(") VALUES (");
|
script.append(") VALUES (");
|
||||||
for (int i = 1; i < row.size(); i++) {
|
for (int i = 1; i < row.size(); i++) {
|
||||||
String newValue = row.get(i);
|
String newValue = row.get(i);
|
||||||
if (newValue != null) {
|
//if (newValue != null) {
|
||||||
Header header = param.getHeaderList().get(i);
|
Header header = param.getHeaderList().get(i);
|
||||||
script.append(SqlUtils.getSqlValue(newValue, header.getDataType()))
|
script.append(SqlUtils.getSqlValue(newValue, header.getDataType()))
|
||||||
.append(",");
|
.append(",");
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
script.deleteCharAt(script.length() - 1);
|
script.deleteCharAt(script.length() - 1);
|
||||||
script.append(")");
|
script.append(")");
|
||||||
|
@ -3,6 +3,8 @@ package ai.chat2db.server.web.api.controller.operation.log.vo;
|
|||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author moji
|
* @author moji
|
||||||
* @version DdlVO.java, v 0.1 2022年09月18日 11:06 moji Exp $
|
* @version DdlVO.java, v 0.1 2022年09月18日 11:06 moji Exp $
|
||||||
@ -16,6 +18,16 @@ public class OperationLogVO {
|
|||||||
*/
|
*/
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime gmtCreate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime gmtModified;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件别名
|
* 文件别名
|
||||||
*/
|
*/
|
||||||
|
@ -186,7 +186,7 @@ public class SQLExecutor {
|
|||||||
ExecuteResult executeResult = ExecuteResult.builder().sql(sql).success(Boolean.TRUE).build();
|
ExecuteResult executeResult = ExecuteResult.builder().sql(sql).success(Boolean.TRUE).build();
|
||||||
try (Statement stmt = connection.createStatement()) {
|
try (Statement stmt = connection.createStatement()) {
|
||||||
stmt.setFetchSize(EasyToolsConstant.MAX_PAGE_SIZE);
|
stmt.setFetchSize(EasyToolsConstant.MAX_PAGE_SIZE);
|
||||||
stmt.setQueryTimeout(30);
|
//stmt.setQueryTimeout(30);
|
||||||
if (offset != null && count != null) {
|
if (offset != null && count != null) {
|
||||||
stmt.setMaxRows(offset + count);
|
stmt.setMaxRows(offset + count);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user