diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5f64d6d1c..63e1e6b17 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,12 @@
+## 3.0.12
+
+`2023-11-13`
+
+**更新日志**
+
+- 🐞【Fixed】Copy as insert first row lost problem
+
+
## 3.0.11
`2023-11-08`
diff --git a/CHANGELOG_CN.md b/CHANGELOG_CN.md
index e0df3f2e1..4525f85d9 100644
--- a/CHANGELOG_CN.md
+++ b/CHANGELOG_CN.md
@@ -1,3 +1,12 @@
+## 3.0.12
+
+`2023-11-13`
+
+**更新日志**
+
+- 🐞【修复】复制为insert第一行丢失问题
+
+
## 3.0.11
`2023-11-10`
diff --git a/chat2db-client/.umirc.ts b/chat2db-client/.umirc.ts
index fe3b19cee..e0c7876a8 100644
--- a/chat2db-client/.umirc.ts
+++ b/chat2db-client/.umirc.ts
@@ -20,12 +20,7 @@ export default defineConfig({
publicPath: '/',
hash: true,
routes: [
- { path: '/demo', component: '@/pages/demo' },
- { path: '/connections', component: 'main' },
- { path: '/workspace', component: 'main' },
- { path: '/dashboard', component: 'main' },
{ path: '/login', component: '@/pages/login' },
- { path: '/test', component: '@/pages/test' },
{ path: '/', component: 'main' },
],
@@ -50,13 +45,7 @@ export default defineConfig({
// rel: 'manifest',
// href: 'manifest.json',
// }],
- links: [
- { rel:"icon",
- type:"image/ico",
- sizes:"32x32",
- href:"/static/front/logo.ico"
- }
- ],
+ links: [{ rel: 'icon', type: 'image/ico', sizes: '32x32', href: '/static/front/logo.ico' }],
headScripts: [
`if (localStorage.getItem('app-local-storage-versions') !== 'v3') {
localStorage.clear();
@@ -100,5 +89,5 @@ export default defineConfig({
__APP_VERSION__: yarn_config.app_version || '0.0.0',
__APP_PORT__: yarn_config.app_port,
},
- esbuildMinifyIIFE: true
+ esbuildMinifyIIFE: true,
});
diff --git a/chat2db-client/script/local-client-build.sh b/chat2db-client/script/local-client-build.sh
deleted file mode 100644
index e69de29bb..000000000
diff --git a/chat2db-client/src/components/Output/index.less b/chat2db-client/src/components/Output/index.less
index d21fa3ea1..1a31e1c7b 100644
--- a/chat2db-client/src/components/Output/index.less
+++ b/chat2db-client/src/components/Output/index.less
@@ -33,6 +33,7 @@
}
.timeSpan{
margin-right: 4px;
+ font-weight: 500;
}
.iconBox {
transform: rotate(90deg);
diff --git a/chat2db-client/src/components/SearchResult/components/TableBox/index.tsx b/chat2db-client/src/components/SearchResult/components/TableBox/index.tsx
index b772104d0..cb46c46a1 100644
--- a/chat2db-client/src/components/SearchResult/components/TableBox/index.tsx
+++ b/chat2db-client/src/components/SearchResult/components/TableBox/index.tsx
@@ -768,7 +768,6 @@ export default function TableBox(props: ITableProps) {
const newRowDatas = tableData.filter((item) => rowIds.includes(item[colNoCode]!));
const newRowDatasList = newRowDatas.map((item) => {
const _item = lodash.cloneDeep(item);
- delete _item[colNoCode];
return Object.keys(_item).map((i) => _item[i]);
});
const _updateDatas = newRowDatasList.map((item, index) => {
@@ -791,7 +790,6 @@ export default function TableBox(props: ITableProps) {
const newRowDatas = tableData.filter((item) => rowIds.includes(item[colNoCode]!));
const newRowDatasList = newRowDatas.map((item) => {
const _item = lodash.cloneDeep(item);
- delete _item[colNoCode];
return Object.keys(_item).map((i) => _item[i]);
});
const _updateDatas = newRowDatasList.map((item, index) => {
diff --git a/chat2db-client/src/layouts/index.tsx b/chat2db-client/src/layouts/index.tsx
index d088530ef..2b8e1b2c2 100644
--- a/chat2db-client/src/layouts/index.tsx
+++ b/chat2db-client/src/layouts/index.tsx
@@ -184,17 +184,6 @@ function AppContainer() {
{startSchedule < 2 && (
- {/* 状态等于1时,说明没服务起来需要轮训接口,这时可能服务配置又问题,需要设置来修改 */}
- {/* {startSchedule === 1 && (
-
-
-
- }
- noLogin
- />
- )} */}
{serviceFail && (
<>
diff --git a/chat2db-client/src/main/menu.js b/chat2db-client/src/main/menu.js
index a0d4eb9ee..311d68463 100644
--- a/chat2db-client/src/main/menu.js
+++ b/chat2db-client/src/main/menu.js
@@ -110,21 +110,21 @@ const registerAppMenu = (mainWindow, orgs) => {
{
label: '访问官网',
click() {
- const url = 'https://chat2db.ai/';
+ const url = 'https://www.sqlgpt.cn/zh';
shell.openExternal(url);
},
},
{
label: '查看文档',
click() {
- const url = 'https://doc.chat2db.ai/';
+ const url = 'https://doc.sqlgpt.cn/zh/';
shell.openExternal(url);
},
},
{
label: '查看更新日志',
click() {
- const url = 'https://doc.chat2db.ai/changelog/';
+ const url = 'https://doc.sqlgpt.cn/zh/changelog/';
shell.openExternal(url);
},
},
diff --git a/chat2db-client/src/pages/main/chat/index.less b/chat2db-client/src/pages/main/chat/index.less
deleted file mode 100644
index 79b7401d7..000000000
--- a/chat2db-client/src/pages/main/chat/index.less
+++ /dev/null
@@ -1,8 +0,0 @@
-.box {
- position: absolute;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- background-color: var(--color-bg);
-}
diff --git a/chat2db-client/src/pages/main/chat/index.tsx b/chat2db-client/src/pages/main/chat/index.tsx
deleted file mode 100644
index 13e7dde9d..000000000
--- a/chat2db-client/src/pages/main/chat/index.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import React, { memo } from 'react';
-import styles from './index.less';
-import classnames from 'classnames';
-
-interface IProps {
- className?: string;
-}
-
-export default memo
(function Chat(props) {
- const { className } = props
- return
- Chat
-
-})
diff --git a/chat2db-server/chat2db-server-web/chat2db-server-web-api/src/main/java/ai/chat2db/server/web/api/controller/operation/saved/request/OperationUpdateRequest.java b/chat2db-server/chat2db-server-web/chat2db-server-web-api/src/main/java/ai/chat2db/server/web/api/controller/operation/saved/request/OperationUpdateRequest.java
index 67a681e6f..5b0b9fe21 100644
--- a/chat2db-server/chat2db-server-web/chat2db-server-web-api/src/main/java/ai/chat2db/server/web/api/controller/operation/saved/request/OperationUpdateRequest.java
+++ b/chat2db-server/chat2db-server-web/chat2db-server-web-api/src/main/java/ai/chat2db/server/web/api/controller/operation/saved/request/OperationUpdateRequest.java
@@ -23,6 +23,26 @@ public class OperationUpdateRequest {
*/
private String name;
+ /**
+ * 数据源连接ID
+ */
+ private Long dataSourceId;
+
+ /**
+ * db名称
+ */
+ private String databaseName;
+
+ /**
+ * 表所在空间
+ */
+ private String schemaName;
+
+ /**
+ * 数据库类型
+ */
+ private String type;
+
/**
* ddl内容
*/
diff --git a/script/local-client-build.sh b/script/local-client-build.sh
new file mode 100644
index 000000000..536d04784
--- /dev/null
+++ b/script/local-client-build.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+# JRE_DIR="${JAVA_HOME}/jre"
+JRE_DIR="~/Library/Java/JavaVirtualMachines/corretto-17.0.8.1/Contents/Home/"
+JRE_TARGET_DIR="chat2db-client/static/jre"
+CURRENT_ID="123"
+
+# Clean
+echo "Clean"
+rm -rf chat2db-client/static
+rm -rf chat2db-client/versions
+rm -rf chat2db-client/release
+
+# 使用 mkdir 创建目录,并使用 -p 参数确保如果目录已存在不会报错
+mkdir -p "$JRE_TARGET_DIR"
+
+# 使用 cp 命令复制 JAVA_HOME 目录内容到目标目录
+# -r 参数表示递归复制整个目录
+cp -r "${JRE_DIR}/" "$JRE_TARGET_DIR"
+chmod -R 777 "$JRE_TARGET_DIR"
+
+# 打包后端代码
+mvn clean package -B '-Dmaven.test.skip=true' -f chat2db-server/pom.xml
+mkdir -p chat2db-client/versions/99.0.${CURRENT_ID}/static
+echo -n 99.0.${CURRENT_ID} > chat2db-client/versions/version
+cp chat2db-server/chat2db-server-start/target/chat2db-server-start.jar chat2db-client/versions/99.0.${CURRENT_ID}/static/
+
+# 打包前端代码
+cd chat2db-client
+yarn install
+yarn run build:web:desktop --app_port=10822
+cp -r dist ./versions/99.0.${CURRENT_ID}/
+# 打包客户端
+yarn run build:main:prod -c.productName=Chat2DB-Test -c.extraMetadata.version=99.0.${CURRENT_ID} --mac --arm64