|
@@ -877,7 +877,6 @@ public class CmBehaviorRecordServiceImpl implements CmBehaviorRecordService {
|
|
|
List<CmClubLabelPo> clubStateKeywordList = recordMapper.getClubStateKeyword();
|
|
|
if (null != clubIdList && clubIdList.size() > 0) {
|
|
|
for (Integer clubId : clubIdList) {
|
|
|
- log.info("clubId===="+clubId);
|
|
|
// 标签
|
|
|
List<String> demandList = new ArrayList<>();
|
|
|
// 出现次数
|
|
@@ -886,9 +885,14 @@ public class CmBehaviorRecordServiceImpl implements CmBehaviorRecordService {
|
|
|
Map<String, Integer> clubIdMap = new HashMap<>();
|
|
|
// 咨询记录
|
|
|
List<CmClubLabelPo> clubLabel = recordMapper.getClubLabel(clubId, startTime, endTime);
|
|
|
- if (clubLabel.size() > 0) {
|
|
|
+ clubLabel.removeIf(Objects::nonNull);
|
|
|
+ if (null != clubLabel && clubLabel.size() > 0) {
|
|
|
// 动态标签
|
|
|
- List<String> trendsKeywordCollect = clubLabel.stream().map(CmClubLabelPo::getTrendsKeyword).collect(Collectors.toList());
|
|
|
+ List<CmClubLabelPo> trendList = clubLabel.stream().filter(label -> StringUtils.isNotBlank(label.getTrendsKeyword())).collect(Collectors.toList());
|
|
|
+ List<String> trendsKeywordCollect = new ArrayList<>();
|
|
|
+ if (null != trendList && trendList.size() > 0) {
|
|
|
+ trendsKeywordCollect = trendList.stream().map(CmClubLabelPo::getTrendsKeyword).collect(Collectors.toList());
|
|
|
+ }
|
|
|
if (null != trendsKeywordCollect && trendsKeywordCollect.size() > 0) {
|
|
|
for (String trendsKeyword : trendsKeywordCollect) {
|
|
|
if (trendsKeyword.contains(",")) {
|
|
@@ -953,7 +957,11 @@ public class CmBehaviorRecordServiceImpl implements CmBehaviorRecordService {
|
|
|
// 对应机构Id
|
|
|
clubIdMap = new HashMap<>();
|
|
|
// 静态标签
|
|
|
- List<String> stateKeywordCollect = clubLabel.stream().map(CmClubLabelPo::getStateKeyword).collect(Collectors.toList());
|
|
|
+ List<CmClubLabelPo> stateList = clubLabel.stream().filter(label -> StringUtils.isNotBlank(label.getStateKeyword())).collect(Collectors.toList());
|
|
|
+ List<String> stateKeywordCollect = new ArrayList<>();
|
|
|
+ if (null != stateList && stateList.size() > 0) {
|
|
|
+ stateKeywordCollect = stateList.stream().map(CmClubLabelPo::getStateKeyword).collect(Collectors.toList());
|
|
|
+ }
|
|
|
if (null != stateKeywordCollect && stateKeywordCollect.size() > 0) {
|
|
|
for (String stateKeyword : stateKeywordCollect) {
|
|
|
if (stateKeyword.contains(",")) {
|