浏览代码

fix: 进线客户统计

xdd 1 月之前
父节点
当前提交
0171120f43

+ 11 - 1
fs-service-system/src/main/java/com/fs/qw/service/impl/QwWatchLogServiceImpl.java

@@ -22,6 +22,8 @@ import com.fs.qw.param.QwWatchLogStatisticsListParam;
 import com.fs.qw.service.IQwWatchLogService;
 import com.fs.qw.service.IQwWatchLogService;
 import com.fs.qw.vo.QwWatchLogAllStatisticsListVO;
 import com.fs.qw.vo.QwWatchLogAllStatisticsListVO;
 import com.fs.qw.vo.QwWatchLogStatisticsListVO;
 import com.fs.qw.vo.QwWatchLogStatisticsListVO;
+import com.fs.store.domain.FsUser;
+import com.fs.store.service.cache.IFsUserCacheService;
 import com.fs.store.service.cache.IFsUserCourseCacheService;
 import com.fs.store.service.cache.IFsUserCourseCacheService;
 import com.github.pagehelper.PageInfo;
 import com.github.pagehelper.PageInfo;
 import com.hc.openapi.tool.util.StringUtils;
 import com.hc.openapi.tool.util.StringUtils;
@@ -57,6 +59,8 @@ public class QwWatchLogServiceImpl extends ServiceImpl<QwWatchLogMapper, QwWatch
 
 
     @Autowired
     @Autowired
     private ICompanyUserCacheService companyUserCacheService;
     private ICompanyUserCacheService companyUserCacheService;
+    @Autowired
+    private IFsUserCacheService fsUserCacheService;
     /**
     /**
      * 查询企微看课
      * 查询企微看课
      *
      *
@@ -314,7 +318,13 @@ public class QwWatchLogServiceImpl extends ServiceImpl<QwWatchLogMapper, QwWatch
                 CompanyUser companyUser = companyUserCacheService.selectCompanyUserById(item.getCompanyUserId());
                 CompanyUser companyUser = companyUserCacheService.selectCompanyUserById(item.getCompanyUserId());
                 if(companyUser != null) {
                 if(companyUser != null) {
                     item.setQwUserName(companyUser.getUserName());
                     item.setQwUserName(companyUser.getUserName());
-                    item.setCreateTime(companyUser.getCreateTime());
+                }
+            }
+            // 会员名称
+            if(ObjectUtils.isNotNull(item.getFsUserId())) {
+                FsUser fsUser = fsUserCacheService.selectFsUserById(item.getFsUserId());
+                if(fsUser != null) {
+                    item.setFsUserName(String.format("%d_%s",fsUser.getUserId(),fsUser.getUsername()));
                 }
                 }
             }
             }
 
 

+ 5 - 0
fs-service-system/src/main/java/com/fs/qw/vo/QwWatchLogAllStatisticsListVO.java

@@ -100,4 +100,9 @@ public class QwWatchLogAllStatisticsListVO {
 
 
     private Long companyUserId;
     private Long companyUserId;
 
 
+    private Long fsUserId;
+
+    private String fsUserName;
+
+
 }
 }

+ 1 - 1
fs-service-system/src/main/resources/mapper/qw/QwWatchLogMapper.xml

@@ -67,7 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             resultType="com.fs.qw.vo.QwWatchLogAllStatisticsListVO">
             resultType="com.fs.qw.vo.QwWatchLogAllStatisticsListVO">
             select
             select
             any_value(company_id) as company_id,
             any_value(company_id) as company_id,
-            company_user_id,
+            company_user_id,line_time as create_time,
             COUNT(CASE WHEN day = 0 and status in (1,2) THEN 1 END) AS firstOnline,
             COUNT(CASE WHEN day = 0 and status in (1,2) THEN 1 END) AS firstOnline,
             COUNT(CASE WHEN day = 0 and status=2 THEN 1 END) AS firstOver,
             COUNT(CASE WHEN day = 0 and status=2 THEN 1 END) AS firstOver,
             COUNT(CASE WHEN day = 1 and status in (1,2) THEN 1 END) AS d1Online,
             COUNT(CASE WHEN day = 1 and status in (1,2) THEN 1 END) AS d1Online,