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
950116bb
Commit
950116bb
authored
Jan 02, 2024
by
chenzai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit 导出
parent
2f4e99bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
StudioResourceService.java
...oin/amos/api/tool/face/service/StudioResourceService.java
+5
-6
No files found.
src/main/java/com/yeejoin/amos/api/tool/face/service/StudioResourceService.java
View file @
950116bb
...
@@ -174,25 +174,25 @@ public class StudioResourceService extends BaseService<StudioResourceModel, Stud
...
@@ -174,25 +174,25 @@ public class StudioResourceService extends BaseService<StudioResourceModel, Stud
Connection
connection
=
this
.
getConnection
(
databaseConnectionService
.
queryBySeq
(
ipSeq
),
databaseName1
);
Connection
connection
=
this
.
getConnection
(
databaseConnectionService
.
queryBySeq
(
ipSeq
),
databaseName1
);
String
sql
=
"select * from studio_application where SEQUENCE_NBR="
+
variables
.
get
(
"appSeq"
);
String
sql
=
"select * from studio_application where SEQUENCE_NBR="
+
variables
.
get
(
"appSeq"
);
List
<
Map
<
String
,
Object
>>
maps
=
DatabaseUtils
.
getMaps
(
sql
,
connection
);
List
<
Map
<
String
,
Object
>>
maps
=
DatabaseUtils
.
getMaps
(
sql
,
connection
);
String
appK
ey
=
""
;
String
appK
=
""
;
String
insertSql2
=
""
;
String
insertSql2
=
""
;
if
(
maps
!=
null
||
maps
.
size
()!=
0
){
if
(
maps
!=
null
||
maps
.
size
()!=
0
){
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
// 遍历每一个Map
// 遍历每一个Map
for
(
Map
.
Entry
<
String
,
Object
>
entry
:
map
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
Object
>
entry
:
map
.
entrySet
())
{
String
key
=
entry
.
getKey
();
String
key
=
entry
.
getKey
();
if
(
key
.
equals
(
appK
ey
)){
if
(
appKey
.
equals
(
k
ey
)){
appK
ey
=(
String
)
map
.
get
(
key
);
appK
=(
String
)
map
.
get
(
key
);
}
}
}
}
}
}
connection
.
close
();
connection
.
close
();
Connection
conn
=
this
.
getConnection
(
databaseConnectionService
.
queryBySeq
(
ipSeq
),
databaseName2
);
Connection
conn
=
this
.
getConnection
(
databaseConnectionService
.
queryBySeq
(
ipSeq
),
databaseName2
);
String
projectSql
=
"select * from privilege_permission where APP_CODE = '"
+
appK
ey
+
"'"
;
String
projectSql
=
"select * from privilege_permission where APP_CODE = '"
+
appK
+
"'"
;
List
<
Map
<
String
,
Object
>>
projectMaps
=
DatabaseUtils
.
getMaps
(
projectSql
,
conn
);
List
<
Map
<
String
,
Object
>>
projectMaps
=
DatabaseUtils
.
getMaps
(
projectSql
,
conn
);
if
(
projectMaps
!=
null
||
projectMaps
.
size
()!=
0
){
if
(
projectMaps
!=
null
||
projectMaps
.
size
()!=
0
){
List
<
TableColumn
>
tableColumn
=
DatabaseUtils
.
getTableColumn
(
"privilege_permission"
,
conn
);
List
<
TableColumn
>
tableColumn
=
DatabaseUtils
.
getTableColumn
(
"privilege_permission"
,
conn
);
insertSql2
=
DatabaseUtils
.
getInsertSQL
(
projectMaps
,
tableColumn
,
"privilege_permission"
).
toString
();
insertSql2
=
DatabaseUtils
.
getInsertSQL
(
projectMaps
,
tableColumn
,
"privilege_permission"
).
toString
();
}
}
conn
.
close
();
conn
.
close
();
}
}
...
@@ -363,7 +363,6 @@ public class StudioResourceService extends BaseService<StudioResourceModel, Stud
...
@@ -363,7 +363,6 @@ public class StudioResourceService extends BaseService<StudioResourceModel, Stud
databaseNames
.
add
(
allDbs
.
get
(
idx
-
1
));
databaseNames
.
add
(
allDbs
.
get
(
idx
-
1
));
}
}
// 查询到需要导出多个,在databaseNames中,循环,多次下载
// 查询到需要导出多个,在databaseNames中,循环,多次下载
// TODO 有bug,connection是同一个。。。
for
(
String
databaseName
:
databaseNames
)
{
for
(
String
databaseName
:
databaseNames
)
{
List
<
String
>
tableNames
=
DatabaseUtils
.
getList
(
"select table_name from information_schema.tables where table_schema='"
+
databaseName
+
"';"
,
connection
);
List
<
String
>
tableNames
=
DatabaseUtils
.
getList
(
"select table_name from information_schema.tables where table_schema='"
+
databaseName
+
"';"
,
connection
);
List
<
StudioResourceModel
>
resourceList
=
queryForStudioResourceList
(
resourceCode
);
List
<
StudioResourceModel
>
resourceList
=
queryForStudioResourceList
(
resourceCode
);
...
...
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