소스 검색

Merge branch 'master' of http://1.14.104.71:10880/root/ylrz_scrm_java

caoliqin 1 개월 전
부모
커밋
80887c45af

+ 7 - 1
fs-service-system/src/main/java/com/fs/qw/mapper/QwWatchLogMapper.java

@@ -7,6 +7,7 @@ import com.fs.qw.vo.QwWatchLogAllStatisticsListVO;
 import com.fs.qw.vo.QwWatchLogStatisticsListVO;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
+import org.springframework.security.core.parameters.P;
 
 import java.util.Date;
 import java.util.List;
@@ -230,5 +231,10 @@ public interface QwWatchLogMapper extends BaseMapper<QwWatchLog>{
 
     Long selectQwExtCountByDayAndCount(QwWatchLogStatisticsListParam param);
 
-    Long selectQwWatchLogAllStatisticsListVONewCount(List<Long> userIds, String sTime, String eTime, Long project, Long courseId, Long videoId);
+    Long selectQwWatchLogAllStatisticsListVONewCount(@Param("companyUserIds") List<Long> userIds,
+                                                     @Param("sDate") String sTime,
+                                                     @Param("eDate") String eTime,
+                                                     @Param("project") Long project,
+                                                     @Param("courseId") Long courseId,
+                                                     @Param("videoId") Long videoId);
 }

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

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

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

@@ -133,7 +133,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             COUNT(1) AS line,project,course_id,video_id
              from hy_watch_log
             <where>
-                 <if test="companyUserIds != null">
+                 <if test="companyUserIds != null and companyUserIds.size() != 0">
                      and company_user_id in
                      <foreach collection="companyUserIds" item="item" open="(" close=")" separator=",">
                          ${item}
@@ -207,7 +207,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         count(1)
         from hy_watch_log
         <where>
-            <if test="companyUserId">
+            <if test="companyUserIds != null">
                 and company_user_id in
                 <foreach collection="companyUserIds" item="item" open="(" close=")" separator=",">
                     ${item}