|
@@ -371,12 +371,28 @@ public class CmBehaviorRecordServiceImpl implements CmBehaviorRecordService {
|
|
int num = 0;
|
|
int num = 0;
|
|
for (CmBehaviorRecordPo recordPo : selDataList) {
|
|
for (CmBehaviorRecordPo recordPo : selDataList) {
|
|
if (recordPo.getIP().equals(data.getIP()) && recordPo.getUserId().equals(data.getUserId())) {
|
|
if (recordPo.getIP().equals(data.getIP()) && recordPo.getUserId().equals(data.getUserId())) {
|
|
|
|
+ // 标签信息 对多存储10个
|
|
if (num < 10) {
|
|
if (num < 10) {
|
|
- if (keywords.contains(recordPo.getPageLabel())) {
|
|
|
|
- if (!item.contains(recordPo.getPageLabel())) {
|
|
|
|
- item.add(recordPo.getPageLabel());
|
|
|
|
- num++;
|
|
|
|
|
|
+ if (StringUtils.isNotBlank(recordPo.getPageLabel())) {
|
|
|
|
+ if (recordPo.getPageLabel().contains(",")) {
|
|
|
|
+ String[] split = recordPo.getPageLabel().split(",");
|
|
|
|
+ for (String s : split) {
|
|
|
|
+ if (keywords.contains(s)) {
|
|
|
|
+ if (!item.contains(s)) {
|
|
|
|
+ item.add(s);
|
|
|
|
+ num++;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ if (keywords.contains(recordPo.getPageLabel())) {
|
|
|
|
+ if (!item.contains(recordPo.getPageLabel())) {
|
|
|
|
+ item.add(recordPo.getPageLabel());
|
|
|
|
+ num++;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (StringUtils.isNotBlank(recordPo.getRelevanceShop()) && !shopNames.contains(recordPo.getRelevanceShop())) {
|
|
if (StringUtils.isNotBlank(recordPo.getRelevanceShop()) && !shopNames.contains(recordPo.getRelevanceShop())) {
|
|
@@ -420,11 +436,26 @@ public class CmBehaviorRecordServiceImpl implements CmBehaviorRecordService {
|
|
if (recordPo.getIP().equals(data.getIP()) && recordPo.getUserId().equals(data.getUserId())) {
|
|
if (recordPo.getIP().equals(data.getIP()) && recordPo.getUserId().equals(data.getUserId())) {
|
|
// 标签信息
|
|
// 标签信息
|
|
if (num < 10) {
|
|
if (num < 10) {
|
|
- if (keywords.contains(recordPo.getPageLabel())) {
|
|
|
|
- if (!item.contains(recordPo.getPageLabel())) {
|
|
|
|
- item.add(recordPo.getPageLabel());
|
|
|
|
- num++;
|
|
|
|
|
|
+ if (StringUtils.isNotBlank(recordPo.getPageLabel())) {
|
|
|
|
+ if (recordPo.getPageLabel().contains(",")) {
|
|
|
|
+ String[] split = recordPo.getPageLabel().split(",");
|
|
|
|
+ for (String s : split) {
|
|
|
|
+ if (keywords.contains(s)) {
|
|
|
|
+ if (!item.contains(s)) {
|
|
|
|
+ item.add(s);
|
|
|
|
+ num++;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ if (keywords.contains(recordPo.getPageLabel())) {
|
|
|
|
+ if (!item.contains(recordPo.getPageLabel())) {
|
|
|
|
+ item.add(recordPo.getPageLabel());
|
|
|
|
+ num++;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// 供应商
|
|
// 供应商
|
|
@@ -436,6 +467,7 @@ public class CmBehaviorRecordServiceImpl implements CmBehaviorRecordService {
|
|
data.setLabel(StringUtils.strip(item.toString(), "[]"));
|
|
data.setLabel(StringUtils.strip(item.toString(), "[]"));
|
|
data.setRelevanceShop(StringUtils.strip(shopNames.toString(), "[]"));
|
|
data.setRelevanceShop(StringUtils.strip(shopNames.toString(), "[]"));
|
|
recordMapper.inBehaviorToday(data);
|
|
recordMapper.inBehaviorToday(data);
|
|
|
|
+ log.info("====今日用户行为列表数据已生成====");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|