|
@@ -146,6 +146,9 @@ public class CmBehaviorRecordServiceImpl implements CmBehaviorRecordService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if (StringUtils.isEmpty(cmBehaviorRecordPo.getBehaviorType()) || StringUtils.isNotBlank(cmBehaviorRecordPo.getBehaviorType())) {
|
|
|
+ cmBehaviorRecordPo.setBehaviorType("0");
|
|
|
+ }
|
|
|
// 供应商Id
|
|
|
if (str.startsWith("shopId") && str.contains("=")) {
|
|
|
String[] split1 = str.split("=");
|
|
@@ -1165,7 +1168,24 @@ public class CmBehaviorRecordServiceImpl implements CmBehaviorRecordService {
|
|
|
// 设置机构访问页面类型和标签
|
|
|
List<CmBehaviorRecordPo> collect = clubBehavior.stream().filter(be -> StringUtils.isNotBlank(be.getPageLabels())).collect(Collectors.toList());
|
|
|
List<String> pageLabelList = collect.stream().map(CmBehaviorRecordPo::getPageLabels).collect(Collectors.toList());
|
|
|
- String strip = StringUtils.strip(pageLabelList.toString(), "[]");
|
|
|
+ List<String> labelList = new ArrayList<>();
|
|
|
+ for (String pageLabel : pageLabelList) {
|
|
|
+ if (StringUtils.isNotBlank(pageLabel)) {
|
|
|
+ if (pageLabel.contains(",")) {
|
|
|
+ String[] split = pageLabel.split(",");
|
|
|
+ for (String str : split) {
|
|
|
+ if (!labelList.contains(str) && StringUtils.isNotBlank(str) && StringUtils.isNotEmpty(str)) {
|
|
|
+ labelList.add(str);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (!labelList.contains(pageLabel) && StringUtils.isNotBlank(pageLabel) && StringUtils.isNotEmpty(pageLabel)) {
|
|
|
+ labelList.add(pageLabel);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ String strip = StringUtils.strip(labelList.toString(), "[]");
|
|
|
if (StringUtils.isNotBlank(strip)) {
|
|
|
cmBehaviorInfo.setLabel(strip.endsWith(".") ? strip.substring(strip.length() - 1) : strip);
|
|
|
} else {
|
|
@@ -1173,12 +1193,30 @@ public class CmBehaviorRecordServiceImpl implements CmBehaviorRecordService {
|
|
|
}
|
|
|
List<CmBehaviorRecordPo> collect1 = clubBehavior.stream().filter(be -> StringUtils.isNotBlank(be.getPageTypes())).collect(Collectors.toList());
|
|
|
List<String> pageTypesList = collect1.stream().map(CmBehaviorRecordPo::getPageTypes).collect(Collectors.toList());
|
|
|
- String strip1 = StringUtils.strip(pageTypesList.toString(), "[]");
|
|
|
+ List<String> typesList = new ArrayList<>();
|
|
|
+ for (String pageTypes : pageTypesList) {
|
|
|
+ if (StringUtils.isNotBlank(pageTypes)) {
|
|
|
+ if (pageTypes.contains(",")) {
|
|
|
+ String[] split = pageTypes.split(",");
|
|
|
+ for (String str : split) {
|
|
|
+ if (!typesList.contains(str) && StringUtils.isNotBlank(str) && StringUtils.isNotEmpty(str)) {
|
|
|
+ typesList.add(str);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (!typesList.contains(pageTypes) && StringUtils.isNotBlank(pageTypes) && StringUtils.isNotEmpty(pageTypes)) {
|
|
|
+ typesList.add(pageTypes);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ String strip1 = StringUtils.strip(typesList.toString(), "[]");
|
|
|
if (StringUtils.isNotBlank(strip1)) {
|
|
|
cmBehaviorInfo.setPageType(strip1);
|
|
|
} else {
|
|
|
cmBehaviorInfo.setPageType("");
|
|
|
}
|
|
|
+ cmBehaviorInfo.setDateTime(format);
|
|
|
recordMapper.insertBehaviorInfo(cmBehaviorInfo);
|
|
|
}
|
|
|
}
|