Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nnjcy-data-model
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
梁家彪
nnjcy-data-model
Commits
71ea4320
Commit
71ea4320
authored
Oct 12, 2023
by
梁家彪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改数据库汇聚添加方式
parent
94de6fdc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
dataoperation-server/src/main/java/com/zq/dataoperation/service/DataCollectService.java
+13
-0
No files found.
dataoperation-server/src/main/java/com/zq/dataoperation/service/DataCollectService.java
View file @
71ea4320
...
...
@@ -48,6 +48,9 @@ public class DataCollectService extends ServiceImpl<DataCollectDao, DataCollectS
@Resource
private
DataCollectSettingApiParaDao
dataCollectSettingApiParaDao
;
@Resource
private
QueryDbDao
queryDbDao
;
public
PageVo
<
DataCollectSetting
>
getList
(
DataCollectReq
req
)
{
return
PagingUtils
.
paging
(
req
,
dataCollectDao
,
new
LambdaQueryWrapper
<>(),
DataCollectSetting
.
class
);
}
...
...
@@ -80,6 +83,16 @@ public class DataCollectService extends ServiceImpl<DataCollectDao, DataCollectS
if
(
dataCollectSettingAddReq
.
getDataType
()
!=
3
){
HashMap
<
String
,
Object
>
map
=
new
HashMap
();
BeanUtil
.
copyProperties
(
dataCollectSettingAddReq
.
getDataFromSetting
(),
map
);
if
(
dataCollectSettingAddReq
.
getDataType
()
==
1
){
QueryDb
db
=
queryDbDao
.
selectById
((
Integer
)
map
.
get
(
"databaseId"
));
map
.
put
(
"dbName"
,
db
.
getDbName
());
map
.
put
(
"dbIp"
,
db
.
getDbIp
());
map
.
put
(
"dbPort"
,
db
.
getDbPort
());
map
.
put
(
"username"
,
db
.
getUsername
());
map
.
put
(
"password"
,
db
.
getPassword
());
map
.
put
(
"dbType"
,
db
.
getDbType
());
map
.
remove
(
"databaseId"
);
}
map
.
put
(
"dataCollectSettingId"
,
dataCollectSettingAddReq
.
getId
());
AssertUtils
.
isTrue
(
getDao
(
dataCollectSettingAddReq
.
getDataType
()).
insert
(
map
)==
1
,
"添加失败"
);
}
else
{
...
...
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