浏览代码

fix 学员列表

he2802 3 年之前
父节点
当前提交
7222edea9b
共有 1 个文件被更改,包括 6 次插入8 次删除
  1. 6 8
      zhongzheng-system/src/main/resources/mapper/modules/user/UserMapper.xml

+ 6 - 8
zhongzheng-system/src/main/resources/mapper/modules/user/UserMapper.xml

@@ -288,16 +288,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             AND usl.study_from_plat = #{lastStudyPlat}
             AND usl.study_from_plat = #{lastStudyPlat}
         </if>
         </if>
         <if test="visitStartTime != null and visitStartTime !=''">
         <if test="visitStartTime != null and visitStartTime !=''">
-            and uvl.last_visit_time >= #{visitStartTime}
-        </if>
-        <if test="visitEndTime != null and visitEndTime !=''">
-            and #{visitEndTime} >= uvl.last_visit_time
+            and (SELECT
+            count(*)
+            FROM user_visit_log where user_id = u.user_id and create_time>= #{visitStartTime}  and #{visitEndTime} >= create_time)>0
         </if>
         </if>
         <if test="studyStartTime != null and studyStartTime !=''">
         <if test="studyStartTime != null and studyStartTime !=''">
-            and usl.last_study_time >= #{studyStartTime}
-        </if>
-        <if test="studyEndTime != null and studyEndTime !=''">
-            and #{studyEndTime} >= usl.last_study_time
+            and (SELECT
+            count(*)
+            FROM user_study_log where user_id = u.user_id and create_time>= #{studyStartTime}  and #{studyEndTime} >= create_time)>0
         </if>
         </if>
         <if test="gradeName != null and gradeName != ''">
         <if test="gradeName != null and gradeName != ''">
             and ( SELECT
             and ( SELECT