Commit f2bd0ff0 authored by mcb's avatar mcb

no message

parent 248fa0bf
......@@ -2,4 +2,5 @@ alter table dmp_develop_task add SOURCE_DB_ID varchar(64) default NULL COMMENT'
alter table dmp_develop_task add SOURCE_DB_NAME varchar(64) default NULL COMMENT'源数据库名称';
alter table dmp_develop_task add SOURCE_TABLE_NAME varchar(64) default NULL COMMENT'源数据表名称';
alter table dmp_develop_task add TARGET_DB_NAME varchar(64) default NULL COMMENT'目标数据库名称';
alter table dmp_develop_task add TARGET_TABLE_NAME varchar(64) default NULL COMMENT'目标数据表名称';
\ No newline at end of file
alter table dmp_develop_task add TARGET_TABLE_NAME varchar(64) default NULL COMMENT'目标数据表名称';
alter table dmp_syncing_datasource_type add DB_ATTRS json default null comment '数据库属性';
\ No newline at end of file
package com.jz.dmp.modules.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.jz.common.constant.JsonResult;
......@@ -10,6 +12,7 @@ import com.jz.dmp.modules.controller.DataIntegration.bean.DataSourceListReq;
import com.jz.dmp.modules.dao.DmpSyncingDatasourceDao;
import com.jz.dmp.modules.model.DmpSyncingDatasource;
import com.jz.dmp.modules.service.DmpSyncingDatasourceService;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -145,12 +148,16 @@ public class DmpSyncingDatasourceServiceImpl implements DmpSyncingDatasourceServ
Map<String, ArrayList<Map>> returnMap = new HashMap();
List<Map> list = dmpSyncingDatasourceDao.queryGroupDatasourceType();
if (list.size() > 0 && list != null) {
for (Map<String,Object> dto : list) {
for (Map<String, Object> dto : list) {
String datasourceCatename = (String) dto.get("datasourceCatename");
if (returnMap.get(datasourceCatename) == null) {
returnMap.put(datasourceCatename,new ArrayList<Map>());
returnMap.put(datasourceCatename, new ArrayList<Map>());
}
ArrayList<Map> param = returnMap.get(datasourceCatename);
if (dto.get("dbAttrs") != null) {
JSONObject dbAttrs = JSON.parseObject(dto.get("dbAttrs").toString());
dto.put("dbAttrs", dbAttrs);
}
param.add(dto);
}
}
......
......@@ -294,6 +294,7 @@
datasource as datasourceTypeName,
datasource_catename as datasourceCatename,
datasource_catecode as datasourceCatecode,
db_attrs as dbAttrs,
IFNULL(img_url, '') as imgUrl,
IFNULL(is_enabled, '0') as isEnabled,
IFNULL(is_enable_test, '0') as isEnableTest
......
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