Prechádzať zdrojové kódy

fix: 进线客户统计

xdd 1 mesiac pred
rodič
commit
517fae4527

+ 2 - 0
fs-admin/src/main/java/com/fs/course/controller/FsCourseWatchLogController.java

@@ -120,6 +120,8 @@ public class FsCourseWatchLogController extends BaseController
     @GetMapping("/qwWatchLogAllStatisticsList")
     public TableDataInfo qwWatchLogAllStatisticsList(QwWatchLogStatisticsListParam param)
     {
+        logger.info("会员课程数据汇总 参数: {}",param);
+
         if(param.getCompanyId() == null){
             throw new CustomException("必须选择公司!");
         }

+ 1 - 0
fs-admin/src/main/java/com/fs/course/controller/qw/QwFsCourseWatchLogController.java

@@ -109,6 +109,7 @@ public class QwFsCourseWatchLogController extends BaseController
     @GetMapping("/qwWatchLogAllStatisticsList")
     public TableDataInfo qwWatchLogAllStatisticsList(QwWatchLogStatisticsListParam param)
     {
+        logger.info("企微课程数据汇总 参数:{}",param);
         startPage();
         if (param.getSTime()==null||param.getETime()==null){
             return getDataTable(new ArrayList<>());

+ 3 - 2
fs-service-system/src/main/java/com/fs/company/cache/impl/CompanyUserCacheServiceImpl.java

@@ -9,6 +9,7 @@ import com.github.benmanes.caffeine.cache.Cache;
 import com.github.benmanes.caffeine.cache.Caffeine;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 import org.springframework.stereotype.Service;
 
@@ -16,10 +17,10 @@ import java.util.concurrent.TimeUnit;
 
 @Service
 @Slf4j
-@RequiredArgsConstructor
 public class CompanyUserCacheServiceImpl implements ICompanyUserCacheService {
 
-    private final ICompanyUserService companyUserService;
+    @Autowired
+    private ICompanyUserService companyUserService;
 
     private static final Cache<Long, CompanyUser> USER_CACHE = Caffeine.newBuilder()
             .maximumSize(1000)

+ 4 - 2
fs-service-system/src/main/java/com/fs/qw/service/impl/QwWatchLogServiceImpl.java

@@ -311,9 +311,11 @@ public class QwWatchLogServiceImpl extends ServiceImpl<QwWatchLogMapper, QwWatch
             }
             // 销售名称
             CompanyUser companyUser = companyUserCacheService.selectCompanyUserById(item.getCompanyUserId());
+            if(companyUser != null) {
+                item.setQwUserName(companyUser.getUserName());
+                item.setCreateTime(companyUser.getCreateTime());
+            }
 
-            item.setQwUserName(companyUser.getUserName());
-            item.setCreateTime(companyUser.getCreateTime());
             list.add(item);
         }