소스 검색

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}
         </if>
         <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 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 test="gradeName != null and gradeName != ''">
             and ( SELECT