Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
brandkbs2
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shenjunjie
brandkbs2
Commits
e5f61ef7
Commit
e5f61ef7
authored
Mar 09, 2023
by
shenjunjie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release' into 'master'
Release See merge request
!239
parents
1b1f6d42
16e1cfc7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
src/main/java/com/zhiwei/brandkbs2/service/impl/TaskServiceImpl.java
+6
-6
No files found.
src/main/java/com/zhiwei/brandkbs2/service/impl/TaskServiceImpl.java
View file @
e5f61ef7
...
...
@@ -116,15 +116,15 @@ public class TaskServiceImpl implements TaskService {
}
// 替换成新的记录map
channelIndexRecordMap
=
newRecordMap
;
//
ListUtils.partition(insertList, 1000).forEach(list -> {
//
channelDao.insertMany(list);
//
});
ListUtils
.
partition
(
insertList
,
1000
).
forEach
(
list
->
{
channelDao
.
insertMany
(
list
);
});
log
.
info
(
"渠道统计-渠道总计-录入完毕,新增渠道{}条,更新渠道{}条"
,
insertList
.
size
(),
channelIndexRecordMap
.
size
()
-
insertList
.
size
());
// 获得单位时间内最小最大时间戳
Long
[]
timeMinMax
=
Tools
.
timeMinMax
(
rangeTimeRecords
.
stream
().
map
(
Pair:
:
getLeft
).
collect
(
Collectors
.
toList
()));
List
<
ChannelRecord
>
channelRecords
=
ChannelRecord
.
createChannelRecords
(
timeMinMax
[
0
],
timeMinMax
[
1
],
channelIndexRecordMap
);
//
channelEsDao.upsertChannelRecord(channelRecords);
// 同步
channelCopy
channelEsDao
.
upsertChannelRecord
(
channelRecords
);
// 同步
ES-channelCopy,区分insertList和updateList
ListUtils
.
partition
(
insertList
,
1000
).
forEach
(
list
->
{
channelEsDao
.
batchInsert
(
list
.
stream
().
map
(
Channel:
:
createChannelCopyMap
).
collect
(
Collectors
.
toList
()));
});
...
...
@@ -207,7 +207,7 @@ public class TaskServiceImpl implements TaskService {
channel
.
setRecord
(
entry
.
getValue
());
Channel
updateChannel
=
channelService
.
calculateChannelEmotionIndex
(
channel
);
updateChannel
.
updateInfo
(
entry
.
getKey
(),
entry
.
getValue
());
//
channelDao.updateOne(updateChannel);
channelDao
.
updateOne
(
updateChannel
);
updateList
.
add
(
channel
);
}
// 设置查询数值
...
...
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