Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-tool
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tool
amos-tool
Commits
3b9edc2f
Commit
3b9edc2f
authored
Jul 20, 2023
by
陈祥烨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导出更新
parent
76731139
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
7 deletions
+10
-7
RelationService.java
...m/yeejoin/amos/api/tool/face/service/RelationService.java
+6
-1
TransferDataService.java
...ejoin/amos/api/tool/face/service/TransferDataService.java
+0
-1
TableUtils.java
...main/java/com/yeejoin/amos/api/tool/utils/TableUtils.java
+2
-1
application-dev.properties
src/main/resources/application-dev.properties
+1
-1
application.properties
src/main/resources/application.properties
+1
-3
No files found.
src/main/java/com/yeejoin/amos/api/tool/face/service/RelationService.java
View file @
3b9edc2f
...
@@ -223,7 +223,9 @@ public class RelationService extends BaseService<RelationModel, Relation, Relati
...
@@ -223,7 +223,9 @@ public class RelationService extends BaseService<RelationModel, Relation, Relati
String
sql
=
this
.
getSelectSQL
(
tableSet
,
model
.
getName
(),
columns
,
agencyCode
).
toString
();
String
sql
=
this
.
getSelectSQL
(
tableSet
,
model
.
getName
(),
columns
,
agencyCode
).
toString
();
List
<
Map
<
String
,
Object
>>
dataList
=
TableUtils
.
getMaps
(
sql
,
connection
);
List
<
Map
<
String
,
Object
>>
dataList
=
TableUtils
.
getMaps
(
sql
,
connection
);
System
.
out
.
println
(
sql
);
System
.
out
.
println
(
sql
);
if
(!
ObjectUtils
.
isEmpty
(
sql
))
insertSql
.
append
(
TableUtils
.
getInsertSQL
(
dataList
,
columns
,
model
.
getName
()));
StringBuffer
insertSQL
=
TableUtils
.
getInsertSQL
(
dataList
,
columns
,
model
.
getName
());
System
.
out
.
println
(
insertSQL
);
if
(!
ObjectUtils
.
isEmpty
(
sql
))
insertSql
.
append
(
insertSQL
);
}
}
}
}
if
(
insertSql
.
length
()
>
0
)
{
if
(
insertSql
.
length
()
>
0
)
{
...
@@ -233,6 +235,9 @@ public class RelationService extends BaseService<RelationModel, Relation, Relati
...
@@ -233,6 +235,9 @@ public class RelationService extends BaseService<RelationModel, Relation, Relati
writer
.
write
(
insertSql
.
toString
());
writer
.
write
(
insertSql
.
toString
());
writer
.
write
(
BR
+
BR
+
DELIMITER
+
BR
);
writer
.
write
(
BR
+
BR
+
DELIMITER
+
BR
);
}
}
writer
.
flush
();
writer
.
close
();
out
.
close
();
download
(
response
,
fileName
,
sqlFilePath
);
download
(
response
,
fileName
,
sqlFilePath
);
}
catch
(
SQLException
|
IOException
e
)
{
}
catch
(
SQLException
|
IOException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
src/main/java/com/yeejoin/amos/api/tool/face/service/TransferDataService.java
View file @
3b9edc2f
...
@@ -2,7 +2,6 @@ package com.yeejoin.amos.api.tool.face.service;
...
@@ -2,7 +2,6 @@ package com.yeejoin.amos.api.tool.face.service;
import
com.yeejoin.amos.api.tool.face.orm.entity.TableColumn
;
import
com.yeejoin.amos.api.tool.face.orm.entity.TableColumn
;
import
com.yeejoin.amos.api.tool.utils.TableUtils
;
import
com.yeejoin.amos.api.tool.utils.TableUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.sql.Connection
;
import
java.sql.Connection
;
...
...
src/main/java/com/yeejoin/amos/api/tool/utils/TableUtils.java
View file @
3b9edc2f
...
@@ -95,7 +95,8 @@ public class TableUtils {
...
@@ -95,7 +95,8 @@ public class TableUtils {
List
<
TableColumn
>
columns
=
new
ArrayList
<>();
List
<
TableColumn
>
columns
=
new
ArrayList
<>();
for
(
Map
<
String
,
Object
>
map
:
columnList
)
{
for
(
Map
<
String
,
Object
>
map
:
columnList
)
{
TableColumn
column
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
map
),
TableColumn
.
class
);
TableColumn
column
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
map
),
TableColumn
.
class
);
columns
.
add
(
column
);
if
(!
column
.
getColumnName
().
equals
(
"content"
))
columns
.
add
(
column
);
}
}
return
columns
;
return
columns
;
}
}
...
...
src/main/resources/application-dev.properties
View file @
3b9edc2f
#DB properties:
#DB properties:
# jdbc_config
# jdbc_config
spring.datasource.url
=
jdbc:mysql://39.98.45.134:3306/amos_
studio
?allowMultiQueries=true
spring.datasource.url
=
jdbc:mysql://39.98.45.134:3306/amos_
tool_library_test
?allowMultiQueries=true
spring.datasource.username
=
root
spring.datasource.username
=
root
spring.datasource.password
=
Yeejoin@2020
spring.datasource.password
=
Yeejoin@2020
spring.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
spring.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
...
...
src/main/resources/application.properties
View file @
3b9edc2f
spring.application.name
=
AMOS-ATL
spring.application.name
=
AMOS-ATL
server.servlet.context-path
=
/atl
server.servlet.context-path
=
/atl
#server.servlet.context-path=/jcs
server.port
=
30201
server.port
=
30002
#server.port=20000
spring.profiles.active
=
dev
spring.profiles.active
=
dev
...
...
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