Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jz-dmp-service
Project
Project
Details
Activity
Releases
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
姚本章
jz-dmp-service
Commits
f2bd0ff0
Commit
f2bd0ff0
authored
Dec 25, 2020
by
mcb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
248fa0bf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
update.sql
database/mcb/update.sql
+2
-1
DmpSyncingDatasourceServiceImpl.java
...modules/service/impl/DmpSyncingDatasourceServiceImpl.java
+9
-2
DmpSyncingDatasourceDao.xml
src/main/resources/mapper/dmp/DmpSyncingDatasourceDao.xml
+1
-0
No files found.
database/mcb/update.sql
View file @
f2bd0ff0
...
@@ -2,4 +2,5 @@ alter table dmp_develop_task add SOURCE_DB_ID varchar(64) default NULL COMMENT'
...
@@ -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_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
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_DB_NAME
varchar
(
64
)
default
NULL
COMMENT
'目标数据库名称'
;
alter
table
dmp_develop_task
add
TARGET_TABLE_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_syncing_datasource_type
add
DB_ATTRS
json
default
null
comment
'数据库属性'
;
\ No newline at end of file
src/main/java/com/jz/dmp/modules/service/impl/DmpSyncingDatasourceServiceImpl.java
View file @
f2bd0ff0
package
com
.
jz
.
dmp
.
modules
.
service
.
impl
;
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.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.jz.common.constant.JsonResult
;
import
com.jz.common.constant.JsonResult
;
...
@@ -10,6 +12,7 @@ import com.jz.dmp.modules.controller.DataIntegration.bean.DataSourceListReq;
...
@@ -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.dao.DmpSyncingDatasourceDao
;
import
com.jz.dmp.modules.model.DmpSyncingDatasource
;
import
com.jz.dmp.modules.model.DmpSyncingDatasource
;
import
com.jz.dmp.modules.service.DmpSyncingDatasourceService
;
import
com.jz.dmp.modules.service.DmpSyncingDatasourceService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -145,12 +148,16 @@ public class DmpSyncingDatasourceServiceImpl implements DmpSyncingDatasourceServ
...
@@ -145,12 +148,16 @@ public class DmpSyncingDatasourceServiceImpl implements DmpSyncingDatasourceServ
Map
<
String
,
ArrayList
<
Map
>>
returnMap
=
new
HashMap
();
Map
<
String
,
ArrayList
<
Map
>>
returnMap
=
new
HashMap
();
List
<
Map
>
list
=
dmpSyncingDatasourceDao
.
queryGroupDatasourceType
();
List
<
Map
>
list
=
dmpSyncingDatasourceDao
.
queryGroupDatasourceType
();
if
(
list
.
size
()
>
0
&&
list
!=
null
)
{
if
(
list
.
size
()
>
0
&&
list
!=
null
)
{
for
(
Map
<
String
,
Object
>
dto
:
list
)
{
for
(
Map
<
String
,
Object
>
dto
:
list
)
{
String
datasourceCatename
=
(
String
)
dto
.
get
(
"datasourceCatename"
);
String
datasourceCatename
=
(
String
)
dto
.
get
(
"datasourceCatename"
);
if
(
returnMap
.
get
(
datasourceCatename
)
==
null
)
{
if
(
returnMap
.
get
(
datasourceCatename
)
==
null
)
{
returnMap
.
put
(
datasourceCatename
,
new
ArrayList
<
Map
>());
returnMap
.
put
(
datasourceCatename
,
new
ArrayList
<
Map
>());
}
}
ArrayList
<
Map
>
param
=
returnMap
.
get
(
datasourceCatename
);
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
);
param
.
add
(
dto
);
}
}
}
}
...
...
src/main/resources/mapper/dmp/DmpSyncingDatasourceDao.xml
View file @
f2bd0ff0
...
@@ -294,6 +294,7 @@
...
@@ -294,6 +294,7 @@
datasource as datasourceTypeName,
datasource as datasourceTypeName,
datasource_catename as datasourceCatename,
datasource_catename as datasourceCatename,
datasource_catecode as datasourceCatecode,
datasource_catecode as datasourceCatecode,
db_attrs as dbAttrs,
IFNULL(img_url, '') as imgUrl,
IFNULL(img_url, '') as imgUrl,
IFNULL(is_enabled, '0') as isEnabled,
IFNULL(is_enabled, '0') as isEnabled,
IFNULL(is_enable_test, '0') as isEnableTest
IFNULL(is_enable_test, '0') as isEnableTest
...
...
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