Commit 38564d67 by shenjunjie

Merge branch 'feature' into 'dev'

2022/11/14 18:12

See merge request !81
parents ae71fabd 33a5d9dc
......@@ -88,7 +88,8 @@ public class RedisKeyPrefix {
*/
public static final String PROJECT_WARN_HOT_TOP = "BRANDKBS:HOT_TOP:";
public static final String PROJECT_WARN_NEW_CASE = "BRANDKBS:NEW_CASE:";
public static final String PROJECT_WARN_NEW_CASE_LIST = "BRANDKBS:NEW_CASE:LIST_";
public static final String PROJECT_WARN_NEW_CASE_CURSOR = "BRANDKBS:NEW_CASE:CURSOR:";
public static String projectWarnHotTopKeyAll(String projectId, String type) {
return RedisKeyPrefix.generateRedisKey(RedisKeyPrefix.PROJECT_WARN_HOT_TOP, projectId, Tools.concat(type, "*"));
......
package com.zhiwei.brandkbs2.pojo.external;
import com.zhiwei.brandkbs2.pojo.vo.CrisisCaseWarnVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
......@@ -39,6 +41,26 @@ public class BrandkbsNewCaseWarn {
* 案例类别
*/
private String caseType;
/**
* 分享链接
*/
private String url;
public static NewCase createFromCrisisCaseWarnVO(CrisisCaseWarnVO vo, String url) {
NewCase newCase = new NewCase();
newCase.setTitle(vo.getEventName());
List<String> tagList = new ArrayList<>();
tagList.add(vo.getPriBrand());
tagList.addAll(vo.getPriCrisisTags());
newCase.setTagList(tagList);
newCase.setContent(vo.getIntroduction());
newCase.setSpreadIndex(vo.getInterveneScore());
newCase.setCaseType(vo.getCategory());
newCase.setUrl(url);
return newCase;
}
}
}
......@@ -14,7 +14,7 @@ public class CrisisCaseWarnVO {
/**
* id
*/
private String id;
private int id;
/**
* 事件名
......@@ -42,4 +42,10 @@ public class CrisisCaseWarnVO {
* 公关传播效果指数
*/
private Double interveneScore;
/**
* 案例类别
*/
private String category;
}
......@@ -142,6 +142,7 @@ public class MarkFlowServiceImpl implements MarkFlowService {
}
double channelValue = tJson.getDoubleValue(GenericAttribute.ES_CHANNEL_INFLUENCE);
if (channelValue > 0) {
// 保留两位小数
sourceDetails.put("channelInfluence", new BigDecimal(channelValue).setScale(2, RoundingMode.UP));
}
return sourceDetails;
......
......@@ -57,8 +57,16 @@ public class RedisUtil {
return RedisKeyPrefix.CHANNEL_RECORD_LIST + Tools.concat(projectId, startTime, endTime);
}
public static String getNewCrisisCaseListKey() {
return RedisKeyPrefix.PROJECT_WARN_NEW_CASE + "LIST";
public static String getNewCrisisCaseListAllKey() {
return RedisKeyPrefix.PROJECT_WARN_NEW_CASE_LIST + "*";
}
public static String getNewCrisisCaseListKey(String id) {
return RedisKeyPrefix.PROJECT_WARN_NEW_CASE_LIST + id;
}
public static String getNewCrisisCaseCursor(String projectId) {
return RedisKeyPrefix.PROJECT_WARN_NEW_CASE_CURSOR + projectId;
}
public void setExpire(String key, String value, long timeout, TimeUnit unit) {
......
......@@ -885,6 +885,9 @@ public class Tools {
}
public static boolean isExclusive(String keyword, String content) {
if (null == keyword) {
return true;
}
return isExclusive(Arrays.asList(keyword.split("\\|")), content);
}
......
......@@ -64,6 +64,7 @@ crisis.top3.url=https://crisis.zhiweidata.com/app/brandkbs/event/online-top3
crisis.searchCriteria.url=https://crisis.zhiweidata.com/app/brandkbs/condition
crisis.list.url=https://crisis.zhiweidata.com/app/brandkbs/crisisList?page={1}&size={2}&startTime={3}&endTime={4}&category={5}
crisis.share.url=https://crisis.zhiweidata.com/app/brandkbs/share/{1}
crisis.event.url =https://crisis.zhiweidata.com/event/{1}/general?share={2}
#\u70ED\u70B9\u5E93\u5916\u90E8\u63A5\u53E3
trends.longTimeInListSearchByInner.url=https://trends.zhiweidata.com/hotSearchTrend/inner/longTimeInListSearchByInner?sortType={1}&type={2}
trends.findHotSearchESDataInTimeByInner.url=https://hotsearch-manage.zhiweidata.com/hotsearch/hotSearch/findHotSearchESDataInTimeByInner?limit={1}&page={2}&type={3}&word={4}
......
......@@ -66,6 +66,7 @@ crisis.top3.url=https://crisis.zhiweidata.com/app/brandkbs/event/online-top3
crisis.searchCriteria.url=https://crisis.zhiweidata.com/app/brandkbs/condition
crisis.list.url=https://crisis.zhiweidata.com/app/brandkbs/crisisList?page={1}&size={2}&startTime={3}&endTime={4}&category={5}
crisis.share.url=https://crisis.zhiweidata.com/app/brandkbs/share/{1}
crisis.event.url =https://crisis.zhiweidata.com/event/{1}/general?share={2}
#\u70ED\u70B9\u5E93\u5916\u90E8\u63A5\u53E3
trends.longTimeInListSearchByInner.url=https://trends.zhiweidata.com/hotSearchTrend/inner/longTimeInListSearchByInner?sortType={1}&type={2}
trends.findHotSearchESDataInTimeByInner.url=https://hotsearch-manage.zhiweidata.com/hotsearch/hotSearch/findHotSearchESDataInTimeByInner?limit={1}&page={2}&type={3}&word={4}
......
......@@ -64,6 +64,7 @@ crisis.top3.url=https://crisis.zhiweidata.com/app/brandkbs/event/online-top3
crisis.searchCriteria.url=https://crisis.zhiweidata.com/app/brandkbs/condition
crisis.list.url=https://crisis.zhiweidata.com/app/brandkbs/crisisList?page={1}&size={2}&startTime={3}&endTime={4}&category={5}
crisis.share.url=https://crisis.zhiweidata.com/app/brandkbs/share/{1}
crisis.event.url =https://crisis.zhiweidata.com/event/{1}/general?share={2}
#\u70ED\u70B9\u5E93\u5916\u90E8\u63A5\u53E3
trends.longTimeInListSearchByInner.url=https://trends.zhiweidata.com/hotSearchTrend/inner/longTimeInListSearchByInner?sortType={1}&type={2}
trends.findHotSearchESDataInTimeByInner.url=https://hotsearch-manage.zhiweidata.com/hotsearch/hotSearch/findHotSearchESDataInTimeByInner?limit={1}&page={2}&type={3}&word={4}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment