Commit 950116bb authored by chenzai's avatar chenzai

commit 导出

parent 2f4e99bd
......@@ -174,21 +174,21 @@ public class StudioResourceService extends BaseService<StudioResourceModel, Stud
Connection connection = this.getConnection(databaseConnectionService.queryBySeq(ipSeq),databaseName1);
String sql="select * from studio_application where SEQUENCE_NBR="+variables.get("appSeq");
List<Map<String, Object>> maps = DatabaseUtils.getMaps(sql, connection);
String appKey="";
String appK="";
String insertSql2="";
if (maps!=null||maps.size()!=0){
for (Map<String, Object> map : maps) {
// 遍历每一个Map
for (Map.Entry<String, Object> entry : map.entrySet()) {
String key = entry.getKey();
if (key.equals(appKey)){
appKey =(String) map.get(key);
if (appKey.equals(key)){
appK =(String) map.get(key);
}
}
}
connection.close();
Connection conn = this.getConnection(databaseConnectionService.queryBySeq(ipSeq),databaseName2);
String projectSql="select * from privilege_permission where APP_CODE = '"+appKey+"'";
String projectSql="select * from privilege_permission where APP_CODE = '"+appK+"'";
List<Map<String, Object>> projectMaps = DatabaseUtils.getMaps(projectSql, conn);
if (projectMaps!=null||projectMaps.size()!=0){
List<TableColumn> tableColumn = DatabaseUtils.getTableColumn("privilege_permission",conn);
......@@ -363,7 +363,6 @@ public class StudioResourceService extends BaseService<StudioResourceModel, Stud
databaseNames.add(allDbs.get(idx - 1));
}
// 查询到需要导出多个,在databaseNames中,循环,多次下载
// TODO 有bug,connection是同一个。。。
for (String databaseName : databaseNames) {
List<String> tableNames = DatabaseUtils.getList("select table_name from information_schema.tables where table_schema='" + databaseName + "';", connection);
List<StudioResourceModel> resourceList = queryForStudioResourceList(resourceCode);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment