Forráskód Böngészése

用户行为优化1.0.5

huangzhiguo 1 éve
szülő
commit
9a9fea231c

+ 3 - 1
src/main/java/com/caimei365/tools/service/impl/CmBehaviorRecordServiceImpl.java

@@ -1228,7 +1228,8 @@ public class CmBehaviorRecordServiceImpl implements CmBehaviorRecordService {
                         } else {
                         } else {
                             cmBehaviorInfo.setPageType("");
                             cmBehaviorInfo.setPageType("");
                         }
                         }
-                        cmBehaviorInfo.setDateTime(format);
+                        // 行为时间取浏览开始时间
+                        cmBehaviorInfo.setDateTime(clubBehavior.get(0).getAccessTime().toString());
                         recordMapper.insertBehaviorInfo(cmBehaviorInfo);
                         recordMapper.insertBehaviorInfo(cmBehaviorInfo);
                     }
                     }
                 }
                 }
@@ -1253,6 +1254,7 @@ public class CmBehaviorRecordServiceImpl implements CmBehaviorRecordService {
                         }
                         }
                         String strip = StringUtils.strip(labels.toString(), "[]");
                         String strip = StringUtils.strip(labels.toString(), "[]");
                         cmBehaviorInfo.setLabel(StringUtils.isNotBlank(strip)? strip : "");
                         cmBehaviorInfo.setLabel(StringUtils.isNotBlank(strip)? strip : "");
+                        cmBehaviorInfo.setDateTime(clubRemarkList.get(0).getAddTime().toString());
                         recordMapper.insertBehaviorInfo(cmBehaviorInfo);
                         recordMapper.insertBehaviorInfo(cmBehaviorInfo);
                     }
                     }
                 }
                 }

+ 3 - 2
src/main/resources/mapper/CmBehaviorRecordMapper.xml

@@ -750,6 +750,7 @@
             c.clubId,
             c.clubId,
             GROUP_CONCAT(b.pageLabel) as pageLabels,
             GROUP_CONCAT(b.pageLabel) as pageLabels,
             GROUP_CONCAT(cpt.pageType) as pageTypes,
             GROUP_CONCAT(cpt.pageType) as pageTypes,
+            MIN(b.accessTime) AS accessTime,
             b.delFlag
             b.delFlag
         FROM cm_behavior_record b
         FROM cm_behavior_record b
                  LEFT JOIN cm_page_type cpt ON b.pageType = cpt.id
                  LEFT JOIN cm_page_type cpt ON b.pageType = cpt.id
@@ -795,7 +796,7 @@
 
 
     <select id="getClubRemarks" resultType="com.caimei365.tools.model.po.ClubRemarksPo">
     <select id="getClubRemarks" resultType="com.caimei365.tools.model.po.ClubRemarksPo">
         SELECT DISTINCT
         SELECT DISTINCT
-            ccr.id AS remarksId, ccr.remarks,  ccr.addTime, ccr.questionMan,
+            ccr.id AS remarksId, ccr.remarks, MIN(ccr.addTime) AS addTime, ccr.questionMan,
             IFNULL(ccr.consultType,'') AS consult,
             IFNULL(ccr.consultType,'') AS consult,
             ccr.clubType, ccr.pinceSensitve, ccr.satisfied, ccr.followup, ccr.extra,
             ccr.clubType, ccr.pinceSensitve, ccr.satisfied, ccr.followup, ccr.extra,
             ccr.communicationSituation, ccr.communicationMethods, ccr.customerSource, ccr.customerGender, ccr.groupAddition,
             ccr.communicationSituation, ccr.communicationMethods, ccr.customerSource, ccr.customerGender, ccr.groupAddition,
@@ -806,7 +807,7 @@
         UNION
         UNION
 
 
         SELECT DISTINCT
         SELECT DISTINCT
-            ccr.id AS remarksId, ccr.remarks, ccr.addTime, ccr.questionMan,
+            ccr.id AS remarksId, ccr.remarks, MIN(ccr.addTime) AS addTime, ccr.questionMan,
             IFNULL(ccr.consultType,'') AS consult,
             IFNULL(ccr.consultType,'') AS consult,
             ccr.clubType, ccr.pinceSensitve, ccr.satisfied, ccr.followup, ccr.extra,
             ccr.clubType, ccr.pinceSensitve, ccr.satisfied, ccr.followup, ccr.extra,
             ccr.communicationSituation AS communicationSituation, ccr.communicationMethods AS communicationMethods, ccr.customerSource AS customerSource,
             ccr.communicationSituation AS communicationSituation, ccr.communicationMethods AS communicationMethods, ccr.customerSource AS customerSource,