Browse Source

Roos统计版本

huangzhiguo 2 năm trước cách đây
mục cha
commit
d1685ebe96

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

@@ -8,8 +8,6 @@
         b.pagePath,
         b.pageType,
         b.pageLabel,
-        b.consultName,
-        b.consultMobile,
         b.productID,
         b.accessTime,
         b.accessDate
@@ -22,18 +20,21 @@
           c.name,
           c.linkMan,
           c.contractMobile,
+          cri.consultName,
+          cri.consultMobile,
           s.name AS sname,
           s.linkMan AS slinkMan,
           s.contractMobile AS scontractMobile,
           (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
         LEFT JOIN USER u ON b.userID = u.userID
         LEFT JOIN club c ON b.userID = c.userID
         LEFT JOIN shop s ON b.userID = s.userID
         LEFT JOIN serviceprovider sp on c.spID = sp.serviceProviderID
+        LEFT JOIN cm_roos_information cri on b.IP = cri.IP
         <where>
-            behaviorType = #{behaviorType}
+            b.behaviorType = #{behaviorType}
             <if test="IP != null and IP != ''">
                 AND b.IP = #{IP}
             </if>
@@ -109,7 +110,7 @@
     <select id="selConsult" resultType="com.caimei.modules.user.entity.CmBehaviorRecord">
         SELECT consultName,
                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>
 </mapper>