浏览代码

Roos统计版本

huangzhiguo 2 年之前
父节点
当前提交
d1685ebe96
共有 1 个文件被更改,包括 7 次插入6 次删除
  1. 7 6
      src/main/resources/mappings/modules/user/CmBehaviorRecordMapper.xml

+ 7 - 6
src/main/resources/mappings/modules/user/CmBehaviorRecordMapper.xml

@@ -8,8 +8,6 @@
         b.pagePath,
         b.pagePath,
         b.pageType,
         b.pageType,
         b.pageLabel,
         b.pageLabel,
-        b.consultName,
-        b.consultMobile,
         b.productID,
         b.productID,
         b.accessTime,
         b.accessTime,
         b.accessDate
         b.accessDate
@@ -22,18 +20,21 @@
           c.name,
           c.name,
           c.linkMan,
           c.linkMan,
           c.contractMobile,
           c.contractMobile,
+          cri.consultName,
+          cri.consultMobile,
           s.name AS sname,
           s.name AS sname,
           s.linkMan AS slinkMan,
           s.linkMan AS slinkMan,
           s.contractMobile AS scontractMobile,
           s.contractMobile AS scontractMobile,
           (SELECT CASE STATUS WHEN 91 THEN '采美默认协销经理(官方账号)' ELSE linkMan END FROM serviceprovider WHERE serviceProviderID = c.spID) AS spName,
           (SELECT CASE STATUS WHEN 91 THEN '采美默认协销经理(官方账号)' ELSE linkMan END FROM serviceprovider WHERE serviceProviderID = c.spID) AS spName,
-          COUNT(IP) as numbers
+          COUNT(b.IP) as numbers
         FROM cm_behavior_record b
         FROM cm_behavior_record b
         LEFT JOIN USER u ON b.userID = u.userID
         LEFT JOIN USER u ON b.userID = u.userID
         LEFT JOIN club c ON b.userID = c.userID
         LEFT JOIN club c ON b.userID = c.userID
         LEFT JOIN shop s ON b.userID = s.userID
         LEFT JOIN shop s ON b.userID = s.userID
         LEFT JOIN serviceprovider sp on c.spID = sp.serviceProviderID
         LEFT JOIN serviceprovider sp on c.spID = sp.serviceProviderID
+        LEFT JOIN cm_roos_information cri on b.IP = cri.IP
         <where>
         <where>
-            behaviorType = #{behaviorType}
+            b.behaviorType = #{behaviorType}
             <if test="IP != null and IP != ''">
             <if test="IP != null and IP != ''">
                 AND b.IP = #{IP}
                 AND b.IP = #{IP}
             </if>
             </if>
@@ -109,7 +110,7 @@
     <select id="selConsult" resultType="com.caimei.modules.user.entity.CmBehaviorRecord">
     <select id="selConsult" resultType="com.caimei.modules.user.entity.CmBehaviorRecord">
         SELECT consultName,
         SELECT consultName,
                consultMobile
                consultMobile
-               FROM cm_behavior_record
-        WHERE behaviorType = 2 AND IP = #{IP} AND accessDate = #{accessDate} AND (consultName IS NOT NULL OR consultName = '') LIMIT 1
+               FROM cm_roos_information
+        WHERE IP = #{IP} AND createTime like concat('%',#{accessDate},'%') AND (consultName IS NOT NULL OR consultName = '') LIMIT 1
     </select>
     </select>
 </mapper>
 </mapper>