浏览代码

用户行为优化1.0.5 ---- 版本,未上线

huangzhiguo 1 年之前
父节点
当前提交
132ae6a9a6
共有 1 个文件被更改,包括 19 次插入8 次删除
  1. 19 8
      src/main/java/com/caimei365/user/service/impl/LoginServiceImpl.java

+ 19 - 8
src/main/java/com/caimei365/user/service/impl/LoginServiceImpl.java

@@ -739,7 +739,7 @@ public class LoginServiceImpl implements LoginService {
                         link = wwwDomain + link;
                     }
                     CmBehaviorInfoPo behaviorInfo = clubMapper.getClubSpId(userId);
-                    setBehaviorInfo(behaviorInfo, link, accessType);
+                    setBehaviorInfo(behaviorInfo, link, accessType, accessClient);
                     if (1 == user.getUserIdentity()) {
                         behaviorInfo.setSpId(user.getServiceProviderId());
                     } else {
@@ -1748,7 +1748,7 @@ public class LoginServiceImpl implements LoginService {
      * @param behaviorInfo
      * @param link
      */
-    private void setBehaviorInfo(CmBehaviorInfoPo behaviorInfo, String link, Integer accessType) {
+    private void setBehaviorInfo(CmBehaviorInfoPo behaviorInfo, String link, Integer accessType, Integer accessClient) {
         Pattern compile = Pattern.compile("^[0-9]+$");
         behaviorInfo.setPagePath(link);
         String labels = "";
@@ -1794,8 +1794,8 @@ public class LoginServiceImpl implements LoginService {
             // 网页
             id = 0;
             // https://www.caimei365.com/page-375.html
-            if (link.contains("topic") || link.contains("equipment") || link.contains("page") || link.contains("product/type") || link.contains("product/activity")
-                    || link.contains("product/beauty") || link.contains("quickOperation/operation") || link.contains("cmpage/info")) {
+            if (accessClient != 1 && (link.contains("topic") || link.contains("equipment") || link.contains("page") || link.contains("product/type") || link.contains("product/activity")
+                    || link.contains("product/beauty") || link.contains("quickOperation/operation") || link.contains("cmpage/info"))) {
                 behaviorInfo.setPageType("网页列表");
                 String[] split = link.split("-");
                 if (split.length <= 2) {
@@ -1814,15 +1814,15 @@ public class LoginServiceImpl implements LoginService {
                 }
                 labels = clubMapper.getPageLabels(id);
             }
-            if (link.contains("caimei-paylist")) {
+            if (link.contains("/caimei-paylist")) {
                 behaviorInfo.setPageType("线上支付");
                 labels = "线上支付";
             }
-            if (link.contains("caimei-payunder")) {
+            if (link.contains("/caimei-payunder")) {
                 behaviorInfo.setPageType("线下支付");
                 labels = "线下支付";
             }
-            if (link.contains("user/order/detail")) {
+            if (link.contains("/user/order/detail")) {
                 behaviorInfo.setPageType("机构订单详情");
                 labels = "机构订单详情";
             }
@@ -1838,6 +1838,14 @@ public class LoginServiceImpl implements LoginService {
                 behaviorInfo.setPageType("文章中心");
                 labels = "文章中心";
             }
+            if (link.contains("/login/apply")) {
+                behaviorInfo.setPageType("升级审核");
+                labels = "升级审核";
+            }
+            if (StringUtils.isBlank(behaviorInfo.getPageType())) {
+                behaviorInfo.setPageType("网页");
+                labels = "网页";
+            }
             behaviorInfo.setType(2);
         } else {
             if (link.contains("/member/member")) {
@@ -1852,7 +1860,10 @@ public class LoginServiceImpl implements LoginService {
                 behaviorInfo.setPageType("升级审核");
                 labels = "升级审核";
             }
-
+            if (StringUtils.isBlank(behaviorInfo.getPageType())) {
+                behaviorInfo.setPageType("网页");
+                labels = "网页";
+            }
             behaviorInfo.setType(3);
         }
         behaviorInfo.setLabel(labels);