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
544fd707
Commit
544fd707
authored
Jul 22, 2022
by
shenjunjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
舆情库测试问题调整
parent
eed08ef5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
103 additions
and
23 deletions
+103
-23
src/main/java/com/zhiwei/brandkbs2/enmus/EmotionEnum.java
+9
-0
src/main/java/com/zhiwei/brandkbs2/es/EsQueryTools.java
+47
-0
src/main/java/com/zhiwei/brandkbs2/service/CommonService.java
+2
-0
src/main/java/com/zhiwei/brandkbs2/service/impl/CommonServiceImpl.java
+7
-1
src/main/java/com/zhiwei/brandkbs2/service/impl/MarkDataServiceImpl.java
+28
-19
src/main/java/com/zhiwei/brandkbs2/service/impl/MarkFlowServiceImpl.java
+10
-3
No files found.
src/main/java/com/zhiwei/brandkbs2/enmus/EmotionEnum.java
View file @
544fd707
...
@@ -112,4 +112,13 @@ public enum EmotionEnum {
...
@@ -112,4 +112,13 @@ public enum EmotionEnum {
return
emotion
;
return
emotion
;
}
}
public
static
int
parseFromName
(
String
name
)
{
for
(
EmotionEnum
value
:
EmotionEnum
.
values
())
{
if
(
value
.
getName
().
equals
(
name
))
{
return
value
.
getState
();
}
}
return
0
;
}
}
}
src/main/java/com/zhiwei/brandkbs2/es/EsQueryTools.java
View file @
544fd707
...
@@ -83,6 +83,32 @@ public class EsQueryTools {
...
@@ -83,6 +83,32 @@ public class EsQueryTools {
}
}
/**
/**
* 媒体类型请求匹配
*
* @param mediaTypes
* @return
*/
public
static
BoolQueryBuilder
assembleMediaTypeQuery
(
List
<
String
>
mediaTypes
)
{
BoolQueryBuilder
tagQuery
=
QueryBuilders
.
boolQuery
();
mediaTypes
.
forEach
(
e
->
{
tagQuery
.
should
(
QueryBuilders
.
termQuery
(
"mark_cache_maps.channel_type.keyword"
,
e
));
});
return
tagQuery
;
}
public
static
BoolQueryBuilder
assembleSourceQuery
(
String
sourceKeyword
)
{
BoolQueryBuilder
channelBoolQueryBuilder
=
QueryBuilders
.
boolQuery
();
String
[]
keys
=
sourceKeyword
.
trim
().
split
(
"\\|"
);
for
(
String
key
:
keys
)
{
String
channelRegex
=
getAllRegex
(
key
);
BoolQueryBuilder
keyQueryBuilder
=
QueryBuilders
.
boolQuery
();
keyQueryBuilder
.
must
(
QueryBuilders
.
regexpQuery
(
"source"
,
".*"
+
channelRegex
+
".*"
));
channelBoolQueryBuilder
.
should
(
keyQueryBuilder
);
}
return
channelBoolQueryBuilder
;
}
/**
* platform 组合语句
* platform 组合语句
*
*
* @param @param platforms
* @param @param platforms
...
@@ -159,4 +185,25 @@ public class EsQueryTools {
...
@@ -159,4 +185,25 @@ public class EsQueryTools {
return
queryMap
;
return
queryMap
;
}
}
private
static
String
getAllRegex
(
String
word
)
{
String
LittleRegex
=
"[a-z]"
;
String
BigRegex
=
"[A-Z]"
;
String
[]
bs
=
word
.
split
(
""
);
StringBuilder
regex
=
new
StringBuilder
();
for
(
String
b
:
bs
)
{
if
(
b
.
matches
(
LittleRegex
))
// 如果是 小写
{
regex
.
append
(
"["
).
append
(
b
).
append
(
b
.
toUpperCase
()).
append
(
"]"
);
}
else
if
(
b
.
matches
(
BigRegex
))
// 大写
{
regex
.
append
(
"["
).
append
(
b
).
append
(
b
.
toLowerCase
()).
append
(
"]"
);
}
else
{
regex
.
append
(
b
);
}
//b = (b + "").matches(LittleRegex) ? b : b;
}
return
regex
.
toString
();
}
}
}
src/main/java/com/zhiwei/brandkbs2/service/CommonService.java
View file @
544fd707
...
@@ -23,6 +23,8 @@ public interface CommonService {
...
@@ -23,6 +23,8 @@ public interface CommonService {
*/
*/
List
<
MarkerTag
>
getQbjcTags
(
String
linkedGroupId
,
TagSearch
...
tagSearches
);
List
<
MarkerTag
>
getQbjcTags
(
String
linkedGroupId
,
TagSearch
...
tagSearches
);
List
<
MarkerTag
>
getEmotionTagsWithSort
(
String
projectId
,
String
linkedGroupId
,
TagSearch
...
tagSearches
);
/**
/**
* 获取qbjcTags
* 获取qbjcTags
*
*
...
...
src/main/java/com/zhiwei/brandkbs2/service/impl/CommonServiceImpl.java
View file @
544fd707
package
com
.
zhiwei
.
brandkbs2
.
service
.
impl
;
package
com
.
zhiwei
.
brandkbs2
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.zhiwei.brandkbs2.common.GenericAttribute
;
import
com.zhiwei.brandkbs2.config.Constant
;
import
com.zhiwei.brandkbs2.config.Constant
;
import
com.zhiwei.brandkbs2.enmus.EmotionEnum
;
import
com.zhiwei.brandkbs2.service.CommonService
;
import
com.zhiwei.brandkbs2.service.CommonService
;
import
com.zhiwei.brandkbs2.service.ProjectService
;
import
com.zhiwei.brandkbs2.service.ProjectService
;
import
com.zhiwei.brandkbs2.util.Tools
;
import
com.zhiwei.brandkbs2.util.Tools
;
...
@@ -57,6 +57,12 @@ public class CommonServiceImpl implements CommonService {
...
@@ -57,6 +57,12 @@ public class CommonServiceImpl implements CommonService {
}
}
@Override
@Override
public
List
<
MarkerTag
>
getEmotionTagsWithSort
(
String
projectId
,
String
linkedGroupId
,
TagSearch
...
tagSearches
)
{
List
<
MarkerTag
>
emotionList
=
getQbjcTags
(
linkedGroupId
,
TagField
.
GROUP_NAME
.
is
(
"情感倾向"
));
return
emotionList
.
stream
().
filter
(
tag
->
0
!=
EmotionEnum
.
parseFromName
(
tag
.
getName
())).
sorted
(
Comparator
.
comparingInt
(
tag
->
EmotionEnum
.
parseFromName
(
tag
.
getName
()))).
collect
(
Collectors
.
toList
());
}
@Override
public
List
<
MarkerTag
>
getQbjcTagsByGroupName
(
String
groupName
,
TagSearch
...
tagSearches
)
{
public
List
<
MarkerTag
>
getQbjcTagsByGroupName
(
String
groupName
,
TagSearch
...
tagSearches
)
{
Objects
.
requireNonNull
(
groupName
);
Objects
.
requireNonNull
(
groupName
);
TagSearch
defaultSearch
=
TagField
.
PROJECT
.
is
(
groupName
);
TagSearch
defaultSearch
=
TagField
.
PROJECT
.
is
(
groupName
);
...
...
src/main/java/com/zhiwei/brandkbs2/service/impl/MarkDataServiceImpl.java
View file @
544fd707
...
@@ -16,7 +16,9 @@ import com.zhiwei.brandkbs2.es.EsQueryTools;
...
@@ -16,7 +16,9 @@ import com.zhiwei.brandkbs2.es.EsQueryTools;
import
com.zhiwei.brandkbs2.exception.ExceptionCast
;
import
com.zhiwei.brandkbs2.exception.ExceptionCast
;
import
com.zhiwei.brandkbs2.listener.ApplicationProjectListener
;
import
com.zhiwei.brandkbs2.listener.ApplicationProjectListener
;
import
com.zhiwei.brandkbs2.model.CommonCodeEnum
;
import
com.zhiwei.brandkbs2.model.CommonCodeEnum
;
import
com.zhiwei.brandkbs2.pojo.*
;
import
com.zhiwei.brandkbs2.pojo.AggreeResult
;
import
com.zhiwei.brandkbs2.pojo.BaseMap
;
import
com.zhiwei.brandkbs2.pojo.MarkFlowEntity
;
import
com.zhiwei.brandkbs2.pojo.dto.ExportAppYuqingDTO
;
import
com.zhiwei.brandkbs2.pojo.dto.ExportAppYuqingDTO
;
import
com.zhiwei.brandkbs2.pojo.dto.MarkSearchDTO
;
import
com.zhiwei.brandkbs2.pojo.dto.MarkSearchDTO
;
import
com.zhiwei.brandkbs2.pojo.vo.CustomTagVo
;
import
com.zhiwei.brandkbs2.pojo.vo.CustomTagVo
;
...
@@ -27,7 +29,6 @@ import com.zhiwei.brandkbs2.util.MongoUtil;
...
@@ -27,7 +29,6 @@ import com.zhiwei.brandkbs2.util.MongoUtil;
import
com.zhiwei.brandkbs2.util.RedisUtil
;
import
com.zhiwei.brandkbs2.util.RedisUtil
;
import
com.zhiwei.brandkbs2.util.TextUtil
;
import
com.zhiwei.brandkbs2.util.TextUtil
;
import
com.zhiwei.brandkbs2.util.Tools
;
import
com.zhiwei.brandkbs2.util.Tools
;
import
com.zhiwei.middleware.mark.pojo.enums.TagField
;
import
com.zhiwei.qbjc.bean.pojo.common.MessagePlatform
;
import
com.zhiwei.qbjc.bean.pojo.common.MessagePlatform
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -108,7 +109,8 @@ public class MarkDataServiceImpl implements MarkDataService {
...
@@ -108,7 +109,8 @@ public class MarkDataServiceImpl implements MarkDataService {
// 搜索es数据
// 搜索es数据
Pair
<
SearchHits
[],
Map
<
String
,
Long
>>
hitsAndCounts
=
searchMarkHitsAndCount
(
markSearchDTO
,
false
);
Pair
<
SearchHits
[],
Map
<
String
,
Long
>>
hitsAndCounts
=
searchMarkHitsAndCount
(
markSearchDTO
,
false
);
// 总量
// 总量
long
total
=
hitsAndCounts
.
getLeft
()[
0
].
getTotalHits
().
value
>
10000
?
10000
:
hitsAndCounts
.
getLeft
()[
0
].
getTotalHits
().
value
;
// long total = hitsAndCounts.getLeft()[0].getTotalHits().value > 10000 ? 10000 : hitsAndCounts.getLeft()[0].getTotalHits().value;
long
total
=
hitsAndCounts
.
getLeft
()[
0
].
getTotalHits
().
value
;
// 消息列表
// 消息列表
List
<
MarkFlowEntity
>
flowEntityList
=
getMarkFlowEntity
(
markSearchDTO
,
hitsAndCounts
.
getLeft
()[
0
]);
List
<
MarkFlowEntity
>
flowEntityList
=
getMarkFlowEntity
(
markSearchDTO
,
hitsAndCounts
.
getLeft
()[
0
]);
// 返回分页结果并设置平台count
// 返回分页结果并设置平台count
...
@@ -277,8 +279,9 @@ public class MarkDataServiceImpl implements MarkDataService {
...
@@ -277,8 +279,9 @@ public class MarkDataServiceImpl implements MarkDataService {
@Override
@Override
public
JSONObject
getYuqingMarkCriteria
(
String
linkedGroupId
)
{
public
JSONObject
getYuqingMarkCriteria
(
String
linkedGroupId
)
{
String
projectId
=
UserThreadLocal
.
getProjectId
();
if
(
null
==
linkedGroupId
)
{
if
(
null
==
linkedGroupId
)
{
linkedGroupId
=
projectService
.
getProjectVOById
(
UserThreadLocal
.
getProjectId
()
).
getBrandLinkedGroupId
();
linkedGroupId
=
projectService
.
getProjectVOById
(
projectId
).
getBrandLinkedGroupId
();
}
}
JSONObject
result
=
new
JSONObject
();
JSONObject
result
=
new
JSONObject
();
// 搜索时间
// 搜索时间
...
@@ -286,7 +289,7 @@ public class MarkDataServiceImpl implements MarkDataService {
...
@@ -286,7 +289,7 @@ public class MarkDataServiceImpl implements MarkDataService {
// 平台
// 平台
result
.
put
(
"platformList"
,
commonService
.
getQbjcPlatform
(
"id"
,
"name"
));
result
.
put
(
"platformList"
,
commonService
.
getQbjcPlatform
(
"id"
,
"name"
));
// 情感标签
// 情感标签
result
.
put
(
"emotionList"
,
commonService
.
get
QbjcTags
(
linkedGroupId
,
TagField
.
GROUP_NAME
.
is
(
"情感倾向"
)
).
stream
().
map
(
markerTag
->
{
result
.
put
(
"emotionList"
,
commonService
.
get
EmotionTagsWithSort
(
projectId
,
linkedGroupId
).
stream
().
map
(
markerTag
->
{
JSONObject
json
=
new
JSONObject
();
JSONObject
json
=
new
JSONObject
();
json
.
put
(
"uniqueId"
,
markerTag
.
getUniqueId
());
json
.
put
(
"uniqueId"
,
markerTag
.
getUniqueId
());
json
.
put
(
"name"
,
markerTag
.
getName
());
json
.
put
(
"name"
,
markerTag
.
getName
());
...
@@ -544,12 +547,15 @@ public class MarkDataServiceImpl implements MarkDataService {
...
@@ -544,12 +547,15 @@ public class MarkDataServiceImpl implements MarkDataService {
// PostFilter 后置过滤器
// PostFilter 后置过滤器
BoolQueryBuilder
postFilter
=
projectLinkedGroupQuery
(
projectId
,
linkedGroupId
);
BoolQueryBuilder
postFilter
=
projectLinkedGroupQuery
(
projectId
,
linkedGroupId
);
// time
// time
postFilter
.
must
(
QueryBuilders
.
rangeQuery
(
dto
.
getTimeType
()).
l
te
(
dto
.
getStartTime
()).
lt
(
dto
.
getEndTime
()));
postFilter
.
must
(
QueryBuilders
.
rangeQuery
(
dto
.
getTimeType
()).
g
te
(
dto
.
getStartTime
()).
lt
(
dto
.
getEndTime
()));
// platform
// platform
if
(
CollectionUtils
.
isNotEmpty
(
dto
.
getPlatforms
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
dto
.
getPlatforms
()))
{
postFilter
.
must
(
EsQueryTools
.
assemblePlatformQuery
(
Tools
.
getPlatformByIds
(
dto
.
getPlatforms
())));
postFilter
.
must
(
EsQueryTools
.
assemblePlatformQuery
(
Tools
.
getPlatformByIds
(
dto
.
getPlatforms
())));
}
}
// mediaTypes ???
// mediaTypes
if
(
CollectionUtils
.
isNotEmpty
(
dto
.
getMediaTypes
()))
{
postFilter
.
must
(
EsQueryTools
.
assembleMediaTypeQuery
(
dto
.
getMediaTypes
()));
}
// tags
// tags
if
(
CollectionUtils
.
isNotEmpty
(
dto
.
getTags
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
dto
.
getTags
()))
{
postFilter
.
must
(
EsQueryTools
.
assembleTagQuery
(
dto
.
getTags
()));
postFilter
.
must
(
EsQueryTools
.
assembleTagQuery
(
dto
.
getTags
()));
...
@@ -558,32 +564,34 @@ public class MarkDataServiceImpl implements MarkDataService {
...
@@ -558,32 +564,34 @@ public class MarkDataServiceImpl implements MarkDataService {
if
(
CollectionUtils
.
isNotEmpty
(
dto
.
getCustomTags
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
dto
.
getCustomTags
()))
{
postFilter
.
must
(
EsQueryTools
.
assembleTagQuery
(
dto
.
getCustomTags
()));
postFilter
.
must
(
EsQueryTools
.
assembleTagQuery
(
dto
.
getCustomTags
()));
}
}
helper
.
setPostFilter
(
postFilter
);
// Query 查询条件
// Query 查询条件
BoolQueryBuilder
query
=
QueryBuilders
.
boolQuery
();
//
BoolQueryBuilder query = QueryBuilders.boolQuery();
// keyword
// keyword
if
(
StringUtils
.
isNotEmpty
(
dto
.
getKeyword
()))
{
if
(
StringUtils
.
isNotEmpty
(
dto
.
getKeyword
()))
{
// Query
// Query
String
[]
fieldSearch
=
"标题"
.
equals
(
dto
.
getSearchField
())
?
new
String
[]{
GenericAttribute
.
ES_IND_TITLE
}
:
new
String
[]{
GenericAttribute
.
ES_IND_FULL_TEXT
};
String
[]
fieldSearch
=
"标题"
.
equals
(
dto
.
getSearchField
())
?
new
String
[]{
GenericAttribute
.
ES_IND_TITLE
}
:
new
String
[]{
GenericAttribute
.
ES_IND_FULL_TEXT
};
query
.
must
(
EsQueryTools
.
assembleNormalKeywordQuery
(
dto
.
getKeyword
(),
fieldSearch
));
postFilter
.
must
(
EsQueryTools
.
assembleNormalKeywordQuery
(
dto
.
getKeyword
(),
fieldSearch
));
}
}
// sourceKeyword
// sourceKeyword
if
(
StringUtils
.
isNotEmpty
(
dto
.
getSourceKeyword
()))
{
if
(
StringUtils
.
isNotEmpty
(
dto
.
getSourceKeyword
()))
{
query
.
must
(
QueryBuilders
.
matchQuery
(
GenericAttribute
.
ES_SOURCE
,
dto
.
getSourceKeyword
()));
postFilter
.
must
(
EsQueryTools
.
assembleSourceQuery
(
dto
.
getSourceKeyword
()));
}
}
helper
.
setQuery
(
query
);
helper
.
setPostFilter
(
postFilter
);
// helper.setQuery(query);
// sort
// sort
FieldSortBuilder
sort
=
null
;
FieldSortBuilder
sort
=
null
;
if
(
null
!=
dto
.
getSorter
())
{
if
(
null
!=
dto
.
getSorter
())
{
for
(
Map
.
Entry
<
String
,
Object
>
entry
:
dto
.
getSorter
().
entrySet
())
{
for
(
Map
.
Entry
<
String
,
Object
>
entry
:
dto
.
getSorter
().
entrySet
())
{
// TODO 暂不支持
String
key
=
entry
.
getKey
();
if
(
entry
.
getKey
().
contains
(
"influence"
))
{
if
(
key
.
equals
(
"influence"
))
{
continue
;
key
=
"channel_influence"
;
}
else
if
(
key
.
equals
(
"followers"
))
{
key
=
"channel_followers"
;
}
}
if
(
entry
.
getValue
().
toString
().
contains
(
"desc"
))
{
if
(
entry
.
getValue
().
toString
().
contains
(
"desc"
))
{
sort
=
SortBuilders
.
fieldSort
(
entry
.
getKey
()
).
order
(
SortOrder
.
DESC
);
sort
=
SortBuilders
.
fieldSort
(
key
).
order
(
SortOrder
.
DESC
);
}
else
{
}
else
{
sort
=
SortBuilders
.
fieldSort
(
entry
.
getKey
()
).
order
(
SortOrder
.
ASC
);
sort
=
SortBuilders
.
fieldSort
(
key
).
order
(
SortOrder
.
ASC
);
}
}
}
}
}
}
...
@@ -609,8 +617,9 @@ public class MarkDataServiceImpl implements MarkDataService {
...
@@ -609,8 +617,9 @@ public class MarkDataServiceImpl implements MarkDataService {
Map
<
String
,
Long
>
counts
=
new
HashMap
<>();
Map
<
String
,
Long
>
counts
=
new
HashMap
<>();
if
(
1
==
dto
.
getPage
()
&&
CollectionUtils
.
isEmpty
(
dto
.
getPlatforms
()))
{
if
(
1
==
dto
.
getPage
()
&&
CollectionUtils
.
isEmpty
(
dto
.
getPlatforms
()))
{
for
(
MessagePlatform
platform
:
GlobalPojo
.
PLATFORMS
)
{
for
(
MessagePlatform
platform
:
GlobalPojo
.
PLATFORMS
)
{
BoolQueryBuilder
queryBuilder
=
QueryBuilders
.
boolQuery
().
must
(
helper
.
getQuery
()).
must
(
EsQueryTools
.
assemblePlatformQuery
(
Collections
.
singletonList
(
platform
)));
BoolQueryBuilder
queryBuilder
=
Long
count
=
esClientDao
.
count
(
esClientDao
.
getIndexes
(),
helper
.
getPostFilter
(),
queryBuilder
);
QueryBuilders
.
boolQuery
().
must
(
helper
.
getPostFilter
()).
must
(
EsQueryTools
.
assemblePlatformQuery
(
Collections
.
singletonList
(
platform
)));
Long
count
=
esClientDao
.
count
(
esClientDao
.
getIndexes
(),
queryBuilder
,
null
);
counts
.
put
(
platform
.
getName
(),
count
);
counts
.
put
(
platform
.
getName
(),
count
);
}
}
}
}
...
...
src/main/java/com/zhiwei/brandkbs2/service/impl/MarkFlowServiceImpl.java
View file @
544fd707
...
@@ -20,6 +20,8 @@ import com.zhiwei.brandkbs2.util.Tools;
...
@@ -20,6 +20,8 @@ import com.zhiwei.brandkbs2.util.Tools;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -116,8 +118,10 @@ public class MarkFlowServiceImpl implements MarkFlowService {
...
@@ -116,8 +118,10 @@ public class MarkFlowServiceImpl implements MarkFlowService {
// source
// source
sourceDetails
.
put
(
"source"
,
source
);
sourceDetails
.
put
(
"source"
,
source
);
// 粉丝量提取
// 粉丝量提取
Long
followersNum
=
tJson
.
getLongValue
(
GenericAttribute
.
ES_FOLLOWERS_NUM
);
long
followersNum
=
tJson
.
getLongValue
(
GenericAttribute
.
ES_FOLLOWERS_NUM
);
sourceDetails
.
put
(
"followersNum"
,
followersNum
);
if
(
followersNum
>
0
)
{
sourceDetails
.
put
(
"followersNum"
,
followersNum
);
}
// 渠道标签
// 渠道标签
sourceDetails
.
put
(
"channelTag"
,
channelTagDao
.
getTagByChannelName
(
source
));
sourceDetails
.
put
(
"channelTag"
,
channelTagDao
.
getTagByChannelName
(
source
));
// 渠道倾向及id
// 渠道倾向及id
...
@@ -133,7 +137,10 @@ public class MarkFlowServiceImpl implements MarkFlowService {
...
@@ -133,7 +137,10 @@ public class MarkFlowServiceImpl implements MarkFlowService {
sourceDetails
.
put
(
"channelEmotion"
,
ChannelEmotion
.
getNameFromState
(
hitMap
.
get
(
"channel_emotion"
)));
sourceDetails
.
put
(
"channelEmotion"
,
ChannelEmotion
.
getNameFromState
(
hitMap
.
get
(
"channel_emotion"
)));
}
}
}
}
sourceDetails
.
put
(
"channelInfluence"
,
tJson
.
getDoubleValue
(
GenericAttribute
.
ES_CHANNEL_INDEX
));
double
channelValue
=
tJson
.
getDoubleValue
(
GenericAttribute
.
ES_CHANNEL_INDEX
);
if
(
channelValue
>
0
)
{
sourceDetails
.
put
(
"channelInfluence"
,
new
BigDecimal
(
channelValue
).
setScale
(
2
,
RoundingMode
.
UP
));
}
return
sourceDetails
;
return
sourceDetails
;
}
}
...
...
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