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
750f0d0c
Commit
750f0d0c
authored
Mar 27, 2024
by
陈健智
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工具集-事件影响力计算调整
parent
426541cc
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
187 additions
and
71 deletions
+187
-71
pom.xml
+12
-1
src/main/java/com/zhiwei/brandkbs2/common/GlobalPojo.java
+9
-6
src/main/java/com/zhiwei/brandkbs2/controller/app/AppDownloadController.java
+15
-8
src/main/java/com/zhiwei/brandkbs2/dao/BytedanceCustomChannelLevelInfoDao.java
+12
-0
src/main/java/com/zhiwei/brandkbs2/dao/impl/BytedanceCustomChannelLevelInfoDaoImpl.java
+14
-0
src/main/java/com/zhiwei/brandkbs2/easyexcel/dto/ExportBytedanceEventComputeResultDTO.java
+5
-3
src/main/java/com/zhiwei/brandkbs2/easyexcel/dto/UploadBytedanceEventDTO.java
+33
-13
src/main/java/com/zhiwei/brandkbs2/easyexcel/listener/BytedanceEventListener.java
+8
-12
src/main/java/com/zhiwei/brandkbs2/pojo/BytedanceCustomChannel.java
+1
-0
src/main/java/com/zhiwei/brandkbs2/pojo/BytedanceCustomChannelInfluence.java
+5
-0
src/main/java/com/zhiwei/brandkbs2/pojo/BytedanceCustomChannelLevelInfo.java
+39
-0
src/main/java/com/zhiwei/brandkbs2/pojo/BytedanceCustomEventUpdateTask.java
+6
-12
src/main/java/com/zhiwei/brandkbs2/pojo/BytedanceCustomEventUpdateTaskData.java
+8
-8
src/main/java/com/zhiwei/brandkbs2/service/SystemInfoService.java
+7
-0
src/main/java/com/zhiwei/brandkbs2/service/impl/SystemInfoServiceImpl.java
+13
-8
src/main/java/com/zhiwei/brandkbs2/service/impl/ToolsetServiceImpl.java
+0
-0
No files found.
pom.xml
View file @
750f0d0c
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
<qbjc.bean.version>
1.1.7.1-SNAPSHOT
</qbjc.bean.version>
<qbjc.bean.version>
1.1.7.1-SNAPSHOT
</qbjc.bean.version>
<springfox.version>
2.9.2
</springfox.version>
<springfox.version>
2.9.2
</springfox.version>
<fastjson.version>
1.2.47
</fastjson.version>
<fastjson.version>
1.2.47
</fastjson.version>
<easyexcel.version>
3.
0.5
</easyexcel.version>
<easyexcel.version>
3.
3.4
</easyexcel.version>
<marker.client.version>
1.1.9-SNAPSHOT
</marker.client.version>
<marker.client.version>
1.1.9-SNAPSHOT
</marker.client.version>
<base-objects.version>
2.1.6.1-SNAPSHOT
</base-objects.version>
<base-objects.version>
2.1.6.1-SNAPSHOT
</base-objects.version>
<es.version>
7.9.2
</es.version>
<es.version>
7.9.2
</es.version>
...
@@ -187,6 +187,17 @@
...
@@ -187,6 +187,17 @@
<groupId>
com.alibaba
</groupId>
<groupId>
com.alibaba
</groupId>
<artifactId>
easyexcel
</artifactId>
<artifactId>
easyexcel
</artifactId>
<version>
${easyexcel.version}
</version>
<version>
${easyexcel.version}
</version>
<exclusions>
<exclusion>
<groupId>
net.sf.ehcache
</groupId>
<artifactId>
ehcache
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
org.ehcache
</groupId>
<artifactId>
ehcache
</artifactId>
<version>
3.7.1
</version>
</dependency>
</dependency>
<!-- lombok -->
<!-- lombok -->
<dependency>
<dependency>
...
...
src/main/java/com/zhiwei/brandkbs2/common/GlobalPojo.java
View file @
750f0d0c
...
@@ -2,10 +2,7 @@ package com.zhiwei.brandkbs2.common;
...
@@ -2,10 +2,7 @@ package com.zhiwei.brandkbs2.common;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.zhiwei.brandkbs2.pojo.ChannelTag
;
import
com.zhiwei.brandkbs2.pojo.*
;
import
com.zhiwei.brandkbs2.pojo.HighlightWord
;
import
com.zhiwei.brandkbs2.pojo.Project
;
import
com.zhiwei.brandkbs2.pojo.SensitiveChannel
;
import
com.zhiwei.brandkbs2.service.ChannelService
;
import
com.zhiwei.brandkbs2.service.ChannelService
;
import
com.zhiwei.brandkbs2.service.SystemInfoService
;
import
com.zhiwei.brandkbs2.service.SystemInfoService
;
import
com.zhiwei.brandkbs2.util.Tools
;
import
com.zhiwei.brandkbs2.util.Tools
;
...
@@ -103,6 +100,11 @@ public class GlobalPojo {
...
@@ -103,6 +100,11 @@ public class GlobalPojo {
*/
*/
public
static
Map
<
String
,
SensitiveChannel
>
COMMON_SENSITIVE_CHANNEL
=
new
HashMap
<>();
public
static
Map
<
String
,
SensitiveChannel
>
COMMON_SENSITIVE_CHANNEL
=
new
HashMap
<>();
/**
* 字节定制指定渠道影响力信息
*/
public
static
Map
<
String
,
BytedanceCustomChannelInfluence
>
BYTEDANCE_CHANNEL_INFLUENCE
=
new
HashMap
<>();
@PostConstruct
@PostConstruct
public
void
start
()
{
public
void
start
()
{
try
{
try
{
...
@@ -139,9 +141,10 @@ public class GlobalPojo {
...
@@ -139,9 +141,10 @@ public class GlobalPojo {
PROJECT_EMOTION_CHANNEL_DATA
=
channelService
.
getProjectEmotionChannelListData
();
PROJECT_EMOTION_CHANNEL_DATA
=
channelService
.
getProjectEmotionChannelListData
();
PROJECT_SENSITIVE_CHANNEL
=
systemInfoService
.
getProjectSensitiveChannel
();
PROJECT_SENSITIVE_CHANNEL
=
systemInfoService
.
getProjectSensitiveChannel
();
COMMON_SENSITIVE_CHANNEL
=
systemInfoService
.
getCommonSensitiveChannel
();
COMMON_SENSITIVE_CHANNEL
=
systemInfoService
.
getCommonSensitiveChannel
();
BYTEDANCE_CHANNEL_INFLUENCE
=
systemInfoService
.
getByteDanceChannelInfluence
();
updateHighlightGraphs
();
updateHighlightGraphs
();
log
.
info
(
"{}-获取PLATFORMS-size:{},TAGS-size:{},LINKED_GROUP_ID_TAGS:{},CHANNEL_TAGS:{},MEDIA_TYPE:{},PROJECT_MAP:{},YUQING-PROJECTS-size:{},PROJECT_EMOTION_CHANNEL_DATA-size:{},PROJECT_SENSITIVE_CHANNEL-size:{}, COMMON_SENSITIVE_CHANNEL-size:{}"
,
logMsg
,
PLATFORMS
.
size
(),
TAGS
.
size
(),
log
.
info
(
"{}-获取PLATFORMS-size:{},TAGS-size:{},LINKED_GROUP_ID_TAGS:{},CHANNEL_TAGS:{},MEDIA_TYPE:{},PROJECT_MAP:{},YUQING-PROJECTS-size:{},PROJECT_EMOTION_CHANNEL_DATA-size:{},PROJECT_SENSITIVE_CHANNEL-size:{}, COMMON_SENSITIVE_CHANNEL-size:{}
,BYTEDANCE_CHANNEL_INFLUENCE-size:{}
"
,
logMsg
,
PLATFORMS
.
size
(),
TAGS
.
size
(),
LINKED_GROUP_ID_TAGS
.
size
(),
CHANNEL_TAGS
.
size
(),
MEDIA_TYPE
.
size
(),
PROJECT_MAP
.
size
(),
YU_QING_PROJECTS
.
size
(),
PROJECT_EMOTION_CHANNEL_DATA
.
size
(),
PROJECT_SENSITIVE_CHANNEL
.
size
(),
COMMON_SENSITIVE_CHANNEL
.
size
());
LINKED_GROUP_ID_TAGS
.
size
(),
CHANNEL_TAGS
.
size
(),
MEDIA_TYPE
.
size
(),
PROJECT_MAP
.
size
(),
YU_QING_PROJECTS
.
size
(),
PROJECT_EMOTION_CHANNEL_DATA
.
size
(),
PROJECT_SENSITIVE_CHANNEL
.
size
(),
COMMON_SENSITIVE_CHANNEL
.
size
()
,
BYTEDANCE_CHANNEL_INFLUENCE
.
size
()
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
info
(
"{}-获取缓存值异常"
,
logMsg
,
e
);
log
.
info
(
"{}-获取缓存值异常"
,
logMsg
,
e
);
}
}
...
...
src/main/java/com/zhiwei/brandkbs2/controller/app/AppDownloadController.java
View file @
750f0d0c
...
@@ -519,15 +519,22 @@ public class AppDownloadController extends BaseController {
...
@@ -519,15 +519,22 @@ public class AppDownloadController extends BaseController {
@DownloadTask
(
taskName
=
"事件影响力更新模板下载"
,
description
=
"事件影响力更新模板"
)
@DownloadTask
(
taskName
=
"事件影响力更新模板下载"
,
description
=
"事件影响力更新模板"
)
public
ResponseResult
downloadEventUpdateTemplate
(){
public
ResponseResult
downloadEventUpdateTemplate
(){
List
<
List
<
String
>>
head
=
new
ArrayList
<>();
List
<
List
<
String
>>
head
=
new
ArrayList
<>();
head
.
add
(
Collections
.
singletonList
(
"序号"
));
head
.
add
(
Collections
.
singletonList
(
"平台类型"
));
head
.
add
(
Collections
.
singletonList
(
"平台类型"
));
head
.
add
(
Collections
.
singletonList
(
"渠道名称"
));
head
.
add
(
Collections
.
singletonList
(
"发布平台"
));
head
.
add
(
Collections
.
singletonList
(
"链接"
));
head
.
add
(
Collections
.
singletonList
(
"渠道"
));
head
.
add
(
Collections
.
singletonList
(
"事件名"
));
head
.
add
(
Collections
.
singletonList
(
"时间"
));
head
.
add
(
Collections
.
singletonList
(
"微博转发"
));
head
.
add
(
Collections
.
singletonList
(
"标题"
));
head
.
add
(
Collections
.
singletonList
(
"微博评论"
));
head
.
add
(
Collections
.
singletonList
(
"文本"
));
head
.
add
(
Collections
.
singletonList
(
"微博点赞"
));
head
.
add
(
Collections
.
singletonList
(
"地址"
));
head
.
add
(
Collections
.
singletonList
(
"微信阅读"
));
head
.
add
(
Collections
.
singletonList
(
"命中词"
));
head
.
add
(
Collections
.
singletonList
(
"微信在看"
));
head
.
add
(
Collections
.
singletonList
(
"情感倾向"
));
head
.
add
(
Collections
.
singletonList
(
"事件标签"
));
head
.
add
(
Collections
.
singletonList
(
"在看"
));
head
.
add
(
Collections
.
singletonList
(
"阅读"
));
head
.
add
(
Collections
.
singletonList
(
"点赞"
));
head
.
add
(
Collections
.
singletonList
(
"评论"
));
head
.
add
(
Collections
.
singletonList
(
"转发"
));
// excel写入至指定路径
// excel写入至指定路径
String
projectName
=
projectService
.
getProjectById
(
UserThreadLocal
.
getProjectId
()).
getProjectName
();
String
projectName
=
projectService
.
getProjectById
(
UserThreadLocal
.
getProjectId
()).
getProjectName
();
String
filePath
=
EasyExcelUtil
.
generateExcelFilePath
(
brandkbsFilePath
,
projectName
,
UserThreadLocal
.
getNickname
(),
"事件更新模板"
);
String
filePath
=
EasyExcelUtil
.
generateExcelFilePath
(
brandkbsFilePath
,
projectName
,
UserThreadLocal
.
getNickname
(),
"事件更新模板"
);
...
...
src/main/java/com/zhiwei/brandkbs2/dao/BytedanceCustomChannelLevelInfoDao.java
0 → 100644
View file @
750f0d0c
package
com
.
zhiwei
.
brandkbs2
.
dao
;
import
com.zhiwei.brandkbs2.pojo.BytedanceCustomChannelLevelInfo
;
/**
* @ClassName: BytedanceCustomChannelDao
* @Description BytedanceCustomChannelDao
* @author: cjz
* @date: 2023-10-13 15:43
*/
public
interface
BytedanceCustomChannelLevelInfoDao
extends
BaseMongoDao
<
BytedanceCustomChannelLevelInfo
>{
}
src/main/java/com/zhiwei/brandkbs2/dao/impl/BytedanceCustomChannelLevelInfoDaoImpl.java
0 → 100644
View file @
750f0d0c
package
com
.
zhiwei
.
brandkbs2
.
dao
.
impl
;
import
com.zhiwei.brandkbs2.dao.BytedanceCustomChannelLevelInfoDao
;
import
com.zhiwei.brandkbs2.pojo.BytedanceCustomChannelLevelInfo
;
import
org.springframework.stereotype.Component
;
@Component
(
"bytedanceCustomChannelLevelInfoDao"
)
public
class
BytedanceCustomChannelLevelInfoDaoImpl
extends
BaseMongoDaoImpl
<
BytedanceCustomChannelLevelInfo
>
implements
BytedanceCustomChannelLevelInfoDao
{
private
static
final
String
COLLECTION_NAME
=
"brandkbs_bytedance_custom_channel_level_info"
;
public
BytedanceCustomChannelLevelInfoDaoImpl
()
{
super
(
COLLECTION_NAME
);
}
}
src/main/java/com/zhiwei/brandkbs2/easyexcel/dto/ExportBytedanceEventComputeResultDTO.java
View file @
750f0d0c
...
@@ -16,13 +16,15 @@ public class ExportBytedanceEventComputeResultDTO {
...
@@ -16,13 +16,15 @@ public class ExportBytedanceEventComputeResultDTO {
@ExcelProperty
(
"事件名"
)
@ExcelProperty
(
"事件名"
)
private
String
name
;
private
String
name
;
@ExcelProperty
(
"
影响力指数
"
)
@ExcelProperty
(
"
渠道指标
"
)
private
Double
inf
;
private
Double
inf
;
@ExcelProperty
(
"
实时传播力
"
)
@ExcelProperty
(
"
流量指标
"
)
private
Double
RMI
;
private
Double
RMI
;
@ExcelProperty
(
"
传播
影响力"
)
@ExcelProperty
(
"
综合
影响力"
)
private
Double
finalInf
;
private
Double
finalInf
;
@ExcelProperty
(
"传播量"
)
private
Integer
dataCount
;
}
}
src/main/java/com/zhiwei/brandkbs2/easyexcel/dto/UploadBytedanceEventDTO.java
View file @
750f0d0c
...
@@ -11,31 +11,51 @@ import lombok.Data;
...
@@ -11,31 +11,51 @@ import lombok.Data;
*/
*/
@Data
@Data
public
class
UploadBytedanceEventDTO
{
public
class
UploadBytedanceEventDTO
{
@ExcelProperty
(
"序号"
)
private
String
number
;
@ExcelProperty
(
"平台类型"
)
@ExcelProperty
(
"平台类型"
)
private
String
platformType
;
@ExcelProperty
(
"发布平台"
)
private
String
platform
;
private
String
platform
;
@ExcelProperty
(
"渠道
名称
"
)
@ExcelProperty
(
"渠道"
)
private
String
channel
;
private
String
channel
;
@ExcelProperty
(
"链接"
)
@ExcelProperty
(
"时间"
)
private
String
time
;
@ExcelProperty
(
"标题"
)
private
String
title
;
@ExcelProperty
(
"文本"
)
private
String
content
;
@ExcelProperty
(
"地址"
)
private
String
url
;
private
String
url
;
@ExcelProperty
(
"事件名"
)
@ExcelProperty
(
"命中词"
)
private
String
hitWord
;
@ExcelProperty
(
"情感倾向"
)
private
String
emotion
;
@ExcelProperty
(
"事件标签"
)
private
String
eventName
;
private
String
eventName
;
@ExcelProperty
(
"
微博转发
"
)
@ExcelProperty
(
"
在看
"
)
private
Integer
weiboForward
;
private
String
reading
;
@ExcelProperty
(
"
微博评论
"
)
@ExcelProperty
(
"
阅读
"
)
private
Integer
weiboComment
;
private
String
read
;
@ExcelProperty
(
"
微博
点赞"
)
@ExcelProperty
(
"点赞"
)
private
Integer
weiboL
ike
;
private
String
l
ike
;
@ExcelProperty
(
"
微信阅读
"
)
@ExcelProperty
(
"
评论
"
)
private
Integer
wechatRead
;
private
String
comment
;
@ExcelProperty
(
"
微信在看
"
)
@ExcelProperty
(
"
转发
"
)
private
Integer
wechatReading
;
private
String
forward
;
}
}
src/main/java/com/zhiwei/brandkbs2/easyexcel/listener/BytedanceEventListener.java
View file @
750f0d0c
...
@@ -4,11 +4,8 @@ import com.alibaba.excel.context.AnalysisContext;
...
@@ -4,11 +4,8 @@ import com.alibaba.excel.context.AnalysisContext;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.zhiwei.brandkbs2.easyexcel.dto.UploadBytedanceEventDTO
;
import
com.zhiwei.brandkbs2.easyexcel.dto.UploadBytedanceEventDTO
;
import
com.zhiwei.brandkbs2.pojo.BytedanceCustomEventUpdateTaskData
;
import
com.zhiwei.brandkbs2.pojo.BytedanceCustomEventUpdateTaskData
;
import
com.zhiwei.brandkbs2.util.Tools
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.Objects
;
/**
/**
...
@@ -33,20 +30,19 @@ public class BytedanceEventListener extends AnalysisEventListener<UploadBytedanc
...
@@ -33,20 +30,19 @@ public class BytedanceEventListener extends AnalysisEventListener<UploadBytedanc
public
void
invoke
(
UploadBytedanceEventDTO
dto
,
AnalysisContext
context
)
{
public
void
invoke
(
UploadBytedanceEventDTO
dto
,
AnalysisContext
context
)
{
BytedanceCustomEventUpdateTaskData
taskData
=
new
BytedanceCustomEventUpdateTaskData
();
BytedanceCustomEventUpdateTaskData
taskData
=
new
BytedanceCustomEventUpdateTaskData
();
taskData
.
setTaskId
(
taskId
);
taskData
.
setTaskId
(
taskId
);
taskData
.
setEventName
(
dto
.
getEventName
());
taskData
.
setPlatformType
(
dto
.
getPlatformType
());
taskData
.
setChannel
(
dto
.
getChannel
());
taskData
.
setPlatform
(
dto
.
getPlatform
());
taskData
.
setPlatform
(
dto
.
getPlatform
());
taskData
.
setUrl
(
dto
.
getUrl
());
taskData
.
setChannel
(
dto
.
getChannel
());
taskData
.
setWeiboComment
(
dto
.
getWeiboComment
());
taskData
.
setEventName
(
dto
.
getEventName
());
taskData
.
setWeiboForward
(
dto
.
getWeiboForward
());
taskData
.
setReading
(
Objects
.
isNull
(
dto
.
getReading
())
?
0
:
Integer
.
parseInt
(
dto
.
getReading
()));
taskData
.
setWeiboLike
(
dto
.
getWeiboLike
());
taskData
.
setRead
(
Objects
.
isNull
(
dto
.
getRead
())
?
0
:
Integer
.
parseInt
(
dto
.
getRead
()));
taskData
.
setWechatRead
(
dto
.
getWechatRead
());
taskData
.
setLike
(
Objects
.
isNull
(
dto
.
getLike
())
?
0
:
Integer
.
parseInt
(
dto
.
getLike
()));
taskData
.
setWechatReading
(
dto
.
getWechatReading
());
taskData
.
setComment
(
Objects
.
isNull
(
dto
.
getComment
())
?
0
:
Integer
.
parseInt
(
dto
.
getComment
()));
taskData
.
setForward
(
Objects
.
isNull
(
dto
.
getForward
())
?
0
:
Integer
.
parseInt
(
dto
.
getForward
()));
data
.
add
(
taskData
);
data
.
add
(
taskData
);
}
}
@Override
@Override
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
}
}
}
}
src/main/java/com/zhiwei/brandkbs2/pojo/BytedanceCustomChannel.java
View file @
750f0d0c
...
@@ -11,6 +11,7 @@ import lombok.Setter;
...
@@ -11,6 +11,7 @@ import lombok.Setter;
*/
*/
@Getter
@Getter
@Setter
@Setter
@Deprecated
// 2024.3.22 计算公式调整 弃用
public
class
BytedanceCustomChannel
extends
AbstractBaseMongo
{
public
class
BytedanceCustomChannel
extends
AbstractBaseMongo
{
/**
/**
...
...
src/main/java/com/zhiwei/brandkbs2/pojo/BytedanceCustomChannelInfluence.java
View file @
750f0d0c
...
@@ -27,4 +27,9 @@ public class BytedanceCustomChannelInfluence extends AbstractBaseMongo{
...
@@ -27,4 +27,9 @@ public class BytedanceCustomChannelInfluence extends AbstractBaseMongo{
* 影响力
* 影响力
*/
*/
private
double
influence
;
private
double
influence
;
/**
* 渠道等级
*/
private
String
level
;
}
}
src/main/java/com/zhiwei/brandkbs2/pojo/BytedanceCustomChannelLevelInfo.java
0 → 100644
View file @
750f0d0c
package
com
.
zhiwei
.
brandkbs2
.
pojo
;
import
lombok.Getter
;
import
lombok.Setter
;
/**
* @ClassName: BytedanceCustomChannelLevelInfo
* @Description 字节定制渠道等级、拐点、极值、权重对照表
* @author: cjz
* @date: 2024-3-20 14:09
*/
@Getter
@Setter
public
class
BytedanceCustomChannelLevelInfo
extends
AbstractBaseMongo
{
/**
* 等级
*/
private
String
level
;
/**
* HMax
*/
private
double
HMax
;
/**
* 权重
*/
private
double
weight
;
/**
* 临界
*/
private
double
threshold
;
/**
* 系数
*/
private
double
coefficient
;
}
src/main/java/com/zhiwei/brandkbs2/pojo/BytedanceCustomEventUpdateTask.java
View file @
750f0d0c
package
com
.
zhiwei
.
brandkbs2
.
pojo
;
package
com
.
zhiwei
.
brandkbs2
.
pojo
;
import
com.zhiwei.brandkbs2.auth.UserThreadLocal
;
import
com.zhiwei.brandkbs2.auth.UserThreadLocal
;
import
com.zhiwei.brandkbs2.easyexcel.dto.UploadBytedanceEventDTO
;
import
lombok.*
;
import
lombok.*
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* @ClassName: BytedanceCustomEventInfluenceTask
* @ClassName: BytedanceCustomEventInfluenceTask
...
@@ -40,14 +38,6 @@ public class BytedanceCustomEventUpdateTask extends AbstractBaseMongo{
...
@@ -40,14 +38,6 @@ public class BytedanceCustomEventUpdateTask extends AbstractBaseMongo{
*/
*/
private
List
<
EventInfo
>
eventInfo
;
private
List
<
EventInfo
>
eventInfo
;
/**
/**
* 事件数据
*/
// private Map<String, List<UploadBytedanceEventDTO>> eventData;
/**
* 报错数据
*/
private
List
<
BytedanceCustomEventUpdateTaskData
>
errorData
;
/**
* 竞品影响力指数
* 竞品影响力指数
*/
*/
private
Double
contendInfluence
;
private
Double
contendInfluence
;
...
@@ -88,6 +78,10 @@ public class BytedanceCustomEventUpdateTask extends AbstractBaseMongo{
...
@@ -88,6 +78,10 @@ public class BytedanceCustomEventUpdateTask extends AbstractBaseMongo{
*/
*/
private
String
name
;
private
String
name
;
/**
/**
* 传播量(该事件的数据量)
*/
private
Integer
dataCount
;
/**
* 影响力指数
* 影响力指数
*/
*/
private
Double
influence
;
private
Double
influence
;
...
@@ -145,7 +139,7 @@ public class BytedanceCustomEventUpdateTask extends AbstractBaseMongo{
...
@@ -145,7 +139,7 @@ public class BytedanceCustomEventUpdateTask extends AbstractBaseMongo{
task
.
setProcessStatus
(
ProcessStatus
.
CHANNEL_MATCH
.
getStatus
());
task
.
setProcessStatus
(
ProcessStatus
.
CHANNEL_MATCH
.
getStatus
());
task
.
setExtraCompute
(
extraCompute
);
task
.
setExtraCompute
(
extraCompute
);
task
.
setEventInfo
(
new
ArrayList
<>());
task
.
setEventInfo
(
new
ArrayList
<>());
task
.
setErrorData
(
new
ArrayList
<>());
//
task.setErrorData(new ArrayList<>());
task
.
setCancel
(
false
);
task
.
setCancel
(
false
);
task
.
setSchedule
(
0
);
task
.
setSchedule
(
0
);
task
.
setTotalSchedule
(
0
);
task
.
setTotalSchedule
(
0
);
...
@@ -165,7 +159,7 @@ public class BytedanceCustomEventUpdateTask extends AbstractBaseMongo{
...
@@ -165,7 +159,7 @@ public class BytedanceCustomEventUpdateTask extends AbstractBaseMongo{
task
.
setProcessStatus
(
ProcessStatus
.
QUERY_YUQING
.
getStatus
());
task
.
setProcessStatus
(
ProcessStatus
.
QUERY_YUQING
.
getStatus
());
task
.
setExtraCompute
(
false
);
task
.
setExtraCompute
(
false
);
task
.
setEventInfo
(
null
);
task
.
setEventInfo
(
null
);
task
.
setErrorData
(
null
);
//
task.setErrorData(null);
task
.
setCancel
(
false
);
task
.
setCancel
(
false
);
task
.
setSchedule
(
0
);
task
.
setSchedule
(
0
);
task
.
setTotalSchedule
(
0
);
task
.
setTotalSchedule
(
0
);
...
...
src/main/java/com/zhiwei/brandkbs2/pojo/BytedanceCustomEventUpdateTaskData.java
View file @
750f0d0c
...
@@ -6,7 +6,7 @@ import lombok.Setter;
...
@@ -6,7 +6,7 @@ import lombok.Setter;
/**
/**
* @ClassName: BytedanceCustomEventInfluenceTask
* @ClassName: BytedanceCustomEventInfluenceTask
* @Description 字节定制事件影响力计算
rw
* @Description 字节定制事件影响力计算
* @author: cjz
* @author: cjz
* @date: 2023-10-16 15:12
* @date: 2023-10-16 15:12
*/
*/
...
@@ -16,21 +16,21 @@ import lombok.Setter;
...
@@ -16,21 +16,21 @@ import lombok.Setter;
public
class
BytedanceCustomEventUpdateTaskData
extends
AbstractBaseMongo
{
public
class
BytedanceCustomEventUpdateTaskData
extends
AbstractBaseMongo
{
private
String
taskId
;
private
String
taskId
;
private
String
platformType
;
private
String
platform
;
private
String
platform
;
private
String
channel
;
private
String
channel
;
private
String
url
;
private
String
eventName
;
private
String
eventName
;
private
Integer
weiboForward
;
private
Integer
reading
;
private
Integer
weiboComment
;
private
Integer
read
;
private
Integer
weiboL
ike
;
private
Integer
l
ike
;
private
Integer
wechatRead
;
private
Integer
comment
;
private
Integer
wechatReading
;
private
Integer
forward
;
}
}
src/main/java/com/zhiwei/brandkbs2/service/SystemInfoService.java
View file @
750f0d0c
package
com
.
zhiwei
.
brandkbs2
.
service
;
package
com
.
zhiwei
.
brandkbs2
.
service
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.zhiwei.brandkbs2.pojo.BytedanceCustomChannelInfluence
;
import
com.zhiwei.brandkbs2.pojo.ChannelTag
;
import
com.zhiwei.brandkbs2.pojo.ChannelTag
;
import
com.zhiwei.brandkbs2.pojo.Project
;
import
com.zhiwei.brandkbs2.pojo.Project
;
import
com.zhiwei.brandkbs2.pojo.SensitiveChannel
;
import
com.zhiwei.brandkbs2.pojo.SensitiveChannel
;
...
@@ -70,4 +71,10 @@ public interface SystemInfoService {
...
@@ -70,4 +71,10 @@ public interface SystemInfoService {
* @return
* @return
*/
*/
Map
<
String
,
SensitiveChannel
>
getCommonSensitiveChannel
();
Map
<
String
,
SensitiveChannel
>
getCommonSensitiveChannel
();
/**
* 获取字节定制指定渠道影响力信息
* @return
*/
Map
<
String
,
BytedanceCustomChannelInfluence
>
getByteDanceChannelInfluence
();
}
}
src/main/java/com/zhiwei/brandkbs2/service/impl/SystemInfoServiceImpl.java
View file @
750f0d0c
...
@@ -3,19 +3,15 @@ package com.zhiwei.brandkbs2.service.impl;
...
@@ -3,19 +3,15 @@ package com.zhiwei.brandkbs2.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.zhiwei.brandkbs2.dao.ChannelTagDao
;
import
com.zhiwei.brandkbs2.dao.*
;
import
com.zhiwei.brandkbs2.dao.MediaTypeDao
;
import
com.zhiwei.brandkbs2.pojo.*
;
import
com.zhiwei.brandkbs2.dao.ProjectDao
;
import
com.zhiwei.brandkbs2.dao.QbjcPojoDao
;
import
com.zhiwei.brandkbs2.pojo.ChannelTag
;
import
com.zhiwei.brandkbs2.pojo.MediaType
;
import
com.zhiwei.brandkbs2.pojo.Project
;
import
com.zhiwei.brandkbs2.pojo.SensitiveChannel
;
import
com.zhiwei.brandkbs2.service.SystemInfoService
;
import
com.zhiwei.brandkbs2.service.SystemInfoService
;
import
com.zhiwei.brandkbs2.util.Tools
;
import
com.zhiwei.qbjc.bean.pojo.common.MessagePlatform
;
import
com.zhiwei.qbjc.bean.pojo.common.MessagePlatform
;
import
com.zhiwei.qbjc.bean.pojo.common.Tag
;
import
com.zhiwei.qbjc.bean.pojo.common.Tag
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
...
@@ -48,6 +44,9 @@ public class SystemInfoServiceImpl implements SystemInfoService {
...
@@ -48,6 +44,9 @@ public class SystemInfoServiceImpl implements SystemInfoService {
@Resource
@Resource
private
ProjectDao
projectDao
;
private
ProjectDao
projectDao
;
@Resource
(
name
=
"bytedanceCustomChannelInfluenceDao"
)
private
BytedanceCustomChannelInfluenceDao
bytedanceCustomChannelInfluenceDao
;
@Autowired
@Autowired
private
RestTemplate
restTemplate
;
private
RestTemplate
restTemplate
;
...
@@ -132,4 +131,10 @@ public class SystemInfoServiceImpl implements SystemInfoService {
...
@@ -132,4 +131,10 @@ public class SystemInfoServiceImpl implements SystemInfoService {
List
<
SensitiveChannel
>
commonSensitiveChannel
=
qbjcPojoDao
.
findCommonSensitiveChannel
();
List
<
SensitiveChannel
>
commonSensitiveChannel
=
qbjcPojoDao
.
findCommonSensitiveChannel
();
return
commonSensitiveChannel
.
stream
().
collect
(
Collectors
.
toMap
(
SensitiveChannel:
:
getName
,
o
->
o
,
(
k1
,
k2
)
->
k1
));
return
commonSensitiveChannel
.
stream
().
collect
(
Collectors
.
toMap
(
SensitiveChannel:
:
getName
,
o
->
o
,
(
k1
,
k2
)
->
k1
));
}
}
@Override
public
Map
<
String
,
BytedanceCustomChannelInfluence
>
getByteDanceChannelInfluence
()
{
return
bytedanceCustomChannelInfluenceDao
.
findList
(
new
Query
())
.
stream
().
collect
(
Collectors
.
toMap
(
data
->
Tools
.
concat
(
data
.
getPlatform
(),
data
.
getChannel
()),
o
->
o
,
(
v1
,
v2
)
->
v1
));
}
}
}
src/main/java/com/zhiwei/brandkbs2/service/impl/ToolsetServiceImpl.java
View file @
750f0d0c
This diff is collapsed.
Click to expand it.
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