Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nnjcy-data-model
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
梁家彪
nnjcy-data-model
Commits
41dc65d0
Commit
41dc65d0
authored
Nov 03, 2023
by
wqc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
组件调整、通用接口修改
parent
7d2fadcb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
dataoperation-server/src/main/java/com/zq/dataoperation/service/CommonQueryService.java
+0
-0
dataoperation-server/src/main/java/com/zq/dataoperation/utils/SqlUtils.java
+5
-4
dataoperation-server/src/main/resources/mapper/MetaDataMappingMapper.xml
+1
-1
No files found.
dataoperation-server/src/main/java/com/zq/dataoperation/service/CommonQueryService.java
View file @
41dc65d0
This diff is collapsed.
Click to expand it.
dataoperation-server/src/main/java/com/zq/dataoperation/utils/SqlUtils.java
View file @
41dc65d0
...
...
@@ -238,7 +238,8 @@ public class SqlUtils {
public
static
String
jointInsertSql
(
String
tableName
,
Set
<
String
>
cloums
){
StringBuilder
fileds
=
new
StringBuilder
();
for
(
String
cloum
:
cloums
)
{
fileds
.
append
(
cloum
.
replaceAll
(
"\\p{Punct}"
,
""
)).
append
(
","
);
// fileds.append(cloum.replaceAll("\\p{Punct}", "")).append(",");
fileds
.
append
(
cloum
).
append
(
","
);
}
fileds
.
deleteCharAt
(
fileds
.
length
()-
1
);
StringBuilder
sql
=
new
StringBuilder
(
"INSERT INTO "
).
append
(
tableName
).
append
(
"("
).
append
(
fileds
).
append
(
") VALUES ("
);
...
...
@@ -256,9 +257,10 @@ public class SqlUtils {
public
static
String
joinCreateTableSql
(
String
tableName
,
Set
<
String
>
cloums
){
StringBuilder
sql
=
new
StringBuilder
(
"CREATE TABLE "
).
append
(
tableName
).
append
(
"("
);
for
(
String
cloum
:
cloums
)
{
sql
.
append
(
cloum
.
replaceAll
(
"\\p{Punct}"
,
""
)).
append
(
" VARCHAR(255),"
);
// sql.append(cloum.replaceAll("\\p{Punct}", "")).append(" VARCHAR(255),");
sql
.
append
(
cloum
).
append
(
" VARCHAR(255),"
);
}
sql
.
deleteCharAt
(
sql
.
length
()-
1
).
append
(
")"
);
return
sql
.
toString
();
}
}
\ No newline at end of file
}
dataoperation-server/src/main/resources/mapper/MetaDataMappingMapper.xml
View file @
41dc65d0
...
...
@@ -41,7 +41,7 @@
meta_data_mapping t
LEFT JOIN meta_data m ON t.metadata_id = m.id
LEFT JOIN meta_data_category y ON m.category_id = y.id
WHERE y.id=#{id}
WHERE
t.table_sqlname=#{tableName} OR
y.id=#{id}
</select>
<select
id=
"getMetaByTable"
resultType=
"com.zq.dataoperation.vo.MetaDataReq"
>
SELECT
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment