|  | @@ -376,6 +376,127 @@
 | 
	
		
			
				|  |  |          </foreach>
 | 
	
		
			
				|  |  |      </delete>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    <select id="selectFsUserPageListNew" resultType="FsUserPageListVO">
 | 
	
		
			
				|  |  | +        SELECT
 | 
	
		
			
				|  |  | +        fs_user.*,
 | 
	
		
			
				|  |  | +        fs_user_course_count.id,
 | 
	
		
			
				|  |  | +        fs_user_course_count.watch_course_count,
 | 
	
		
			
				|  |  | +        fs_user_course_count.miss_course_count,
 | 
	
		
			
				|  |  | +        fs_user_course_count.miss_course_status,
 | 
	
		
			
				|  |  | +        fs_user_course_count.course_id,
 | 
	
		
			
				|  |  | +        fs_user_course_count.part_course_count,
 | 
	
		
			
				|  |  | +        fs_user_course_count.last_watch_date,
 | 
	
		
			
				|  |  | +        fs_user_course_count.STATUS AS courseCountStatus,
 | 
	
		
			
				|  |  | +        fs_user_course_count.stop_watch_days,
 | 
	
		
			
				|  |  | +        fs_user_course_count.complete_watch_date,
 | 
	
		
			
				|  |  | +        GROUP_CONCAT(DISTINCT company_tag.tag) AS tag,
 | 
	
		
			
				|  |  | +        GROUP_CONCAT(DISTINCT company_tag.tag_id) AS tagIds,
 | 
	
		
			
				|  |  | +        company_user.nick_name as companyUserNickName
 | 
	
		
			
				|  |  | +        FROM
 | 
	
		
			
				|  |  | +        (SELECT
 | 
	
		
			
				|  |  | +        fu.user_id
 | 
	
		
			
				|  |  | +        FROM
 | 
	
		
			
				|  |  | +        fs_user fu
 | 
	
		
			
				|  |  | +        LEFT JOIN company_user cu ON fu.company_user_id = cu.user_id
 | 
	
		
			
				|  |  | +        LEFT JOIN fs_user_course_count fucc ON fu.user_id = fucc.user_id
 | 
	
		
			
				|  |  | +        LEFT JOIN company_tag_user ctu ON fu.user_id = ctu.user_id
 | 
	
		
			
				|  |  | +        <where>
 | 
	
		
			
				|  |  | +            <if test="userId != null and userId !='' ">
 | 
	
		
			
				|  |  | +                AND (cu.user_id = #{userId} OR cu.parent_id = #{userId})
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="companyUserId != null and companyUserId !='' ">
 | 
	
		
			
				|  |  | +                AND cu.user_id = #{companyUserId}
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <choose>
 | 
	
		
			
				|  |  | +                <when test = "isBlack">
 | 
	
		
			
				|  |  | +                    AND fu.status = 0
 | 
	
		
			
				|  |  | +                </when>
 | 
	
		
			
				|  |  | +                <otherwise>
 | 
	
		
			
				|  |  | +                    AND fu.status = 1
 | 
	
		
			
				|  |  | +                </otherwise>
 | 
	
		
			
				|  |  | +            </choose>
 | 
	
		
			
				|  |  | +            <if test="keyword != null and keyword !='' ">
 | 
	
		
			
				|  |  | +                AND (fu.nickname LIKE concat('%',#{keyword},'%')
 | 
	
		
			
				|  |  | +                OR fu.phone LIKE concat('%',#{keyword},'%')
 | 
	
		
			
				|  |  | +                )
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="registerStartTime != null and registerStartTime !='' ">
 | 
	
		
			
				|  |  | +                AND fu.create_time >= #{registerStartTime}
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="registerEndTime != null and registerEndTime !='' ">
 | 
	
		
			
				|  |  | +                AND fu.create_time <= #{registerEndTime}
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="tagIds != null and tagIds.length > 0">
 | 
	
		
			
				|  |  | +                AND
 | 
	
		
			
				|  |  | +                <foreach collection="tagIds" item="item" index="index" open="(" separator="or" close=")">
 | 
	
		
			
				|  |  | +                    ctu.tag_ids LIKE concat('%"',#{item},'"%')
 | 
	
		
			
				|  |  | +                </foreach>
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="tabValue != null and tabValue !='' ">
 | 
	
		
			
				|  |  | +                <choose>
 | 
	
		
			
				|  |  | +                    <when test = "tabValue == 1">
 | 
	
		
			
				|  |  | +                        AND DAY(fu.create_time) = DAY(NOW())
 | 
	
		
			
				|  |  | +                    </when>
 | 
	
		
			
				|  |  | +                    <when test = "tabValue == 2">
 | 
	
		
			
				|  |  | +                        AND DAY(fucc.complete_watch_date) = DAY(NOW())
 | 
	
		
			
				|  |  | +                    </when>
 | 
	
		
			
				|  |  | +                    <when test = "tabValue == 3">
 | 
	
		
			
				|  |  | +                        AND fucc.status = 3
 | 
	
		
			
				|  |  | +                    </when>
 | 
	
		
			
				|  |  | +                </choose>
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="watchCourseType != null and watchCourseType !='' ">
 | 
	
		
			
				|  |  | +                <choose>
 | 
	
		
			
				|  |  | +                    <when test = "watchCourseType == 1">
 | 
	
		
			
				|  |  | +                        AND fucc.status = 3
 | 
	
		
			
				|  |  | +                    </when>
 | 
	
		
			
				|  |  | +                    <when test = "watchCourseType == 2">
 | 
	
		
			
				|  |  | +                        AND fucc.status = 1
 | 
	
		
			
				|  |  | +                    </when>
 | 
	
		
			
				|  |  | +                    <when test = "watchCourseType == 3">
 | 
	
		
			
				|  |  | +                        AND fucc.status = 2
 | 
	
		
			
				|  |  | +                    </when>
 | 
	
		
			
				|  |  | +                </choose>
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="missCourseStatus != null and missCourseStatus !='' ">
 | 
	
		
			
				|  |  | +                <choose>
 | 
	
		
			
				|  |  | +                    <when test = "missCourseStatus == 1">
 | 
	
		
			
				|  |  | +                        AND fucc.miss_course_status = 1
 | 
	
		
			
				|  |  | +                    </when>
 | 
	
		
			
				|  |  | +                    <when test = "missCourseStatus == 2">
 | 
	
		
			
				|  |  | +                        AND fucc.miss_course_status = 2
 | 
	
		
			
				|  |  | +                    </when>
 | 
	
		
			
				|  |  | +                </choose>
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            GROUP BY fu.user_id
 | 
	
		
			
				|  |  | +            <if test="continueMissCourseSort != null and continueMissCourseSort !='' ">
 | 
	
		
			
				|  |  | +                ORDER BY
 | 
	
		
			
				|  |  | +                <choose>
 | 
	
		
			
				|  |  | +                    <when test = "continueMissCourseSort == 0">
 | 
	
		
			
				|  |  | +                        fucc.miss_course_days DESC
 | 
	
		
			
				|  |  | +                    </when>
 | 
	
		
			
				|  |  | +                    <when test = "continueMissCourseSort == 1">
 | 
	
		
			
				|  |  | +                        fucc.miss_course_days ASC
 | 
	
		
			
				|  |  | +                    </when>
 | 
	
		
			
				|  |  | +                    <when test = "continueMissCourseSort == 2">
 | 
	
		
			
				|  |  | +                        fu.create_time DESC
 | 
	
		
			
				|  |  | +                    </when>
 | 
	
		
			
				|  |  | +                    <when test = "continueMissCourseSort == 3">
 | 
	
		
			
				|  |  | +                        fu.nickname ASC
 | 
	
		
			
				|  |  | +                    </when>
 | 
	
		
			
				|  |  | +                </choose>
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +        </where>
 | 
	
		
			
				|  |  | +        LIMIT ${(pageNum-1)*pageSize},${pageSize}
 | 
	
		
			
				|  |  | +        ) temp_user_ids
 | 
	
		
			
				|  |  | +        JOIN fs_user ON temp_user_ids.user_id = fs_user.user_id
 | 
	
		
			
				|  |  | +        LEFT JOIN company_user ON fs_user.company_user_id = company_user.user_id
 | 
	
		
			
				|  |  | +        LEFT JOIN fs_user_course_count ON fs_user.user_id = fs_user_course_count.user_id
 | 
	
		
			
				|  |  | +        LEFT JOIN company_tag_user ON fs_user.user_id = company_tag_user.user_id
 | 
	
		
			
				|  |  | +        LEFT JOIN company_tag ON FIND_IN_SET(company_tag.tag_id, company_tag_user.tag_ids) > 0
 | 
	
		
			
				|  |  | +        GROUP BY fs_user.user_id
 | 
	
		
			
				|  |  | +    </select>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      <select id="selectFsUserPageList" resultType="FsUserPageListVO">
 | 
	
		
			
				|  |  |          SELECT
 | 
	
		
			
				|  |  |          fs_user.*,
 | 
	
	
		
			
				|  | @@ -466,12 +587,7 @@
 | 
	
		
			
				|  |  |                  </when>
 | 
	
		
			
				|  |  |              </choose>
 | 
	
		
			
				|  |  |          </if>
 | 
	
		
			
				|  |  | -        <if test="nickname != null and nickname !='' ">
 | 
	
		
			
				|  |  | -            AND nickname LIKE concat('%"',#{nickname},'"%')
 | 
	
		
			
				|  |  | -        </if>
 | 
	
		
			
				|  |  | -        <if test="phone != null and phone !='' ">
 | 
	
		
			
				|  |  | -            AND phone LIKE concat('%"',#{phone},'"%')
 | 
	
		
			
				|  |  | -        </if>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          group by fs_user.user_id
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          <if test="continueMissCourseSort != null and continueMissCourseSort !='' ">
 | 
	
	
		
			
				|  | @@ -501,7 +617,7 @@
 | 
	
		
			
				|  |  |              fs_user
 | 
	
		
			
				|  |  |                  LEFT JOIN company_user ON fs_user.company_user_id = company_user.user_id
 | 
	
		
			
				|  |  |          WHERE
 | 
	
		
			
				|  |  | -           (company_user.user_id = #{userId} OR company_user.parent_id = #{userId} )
 | 
	
		
			
				|  |  | +            company_user.parent_id = #{userId}
 | 
	
		
			
				|  |  |          GROUP BY
 | 
	
		
			
				|  |  |              fs_user.`status`
 | 
	
		
			
				|  |  |      </select>
 | 
	
	
		
			
				|  | @@ -1163,5 +1279,198 @@
 | 
	
		
			
				|  |  |              fs_user.company_user_id = #{companyUserId}
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    <select id="selectFsUserPageListCount" resultType="java.lang.Long">
 | 
	
		
			
				|  |  | +        SELECT
 | 
	
		
			
				|  |  | +        COUNT(DISTINCT fu.user_id) as total_count
 | 
	
		
			
				|  |  | +        FROM
 | 
	
		
			
				|  |  | +        fs_user fu
 | 
	
		
			
				|  |  | +        LEFT JOIN fs_user_course_count fucc ON fu.user_id = fucc.user_id
 | 
	
		
			
				|  |  | +        <where>
 | 
	
		
			
				|  |  | +            <if test="userId != null and userId !='' ">
 | 
	
		
			
				|  |  | +                AND (cu.user_id = #{userId} OR cu.parent_id = #{userId})
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="companyUserId != null and companyUserId !='' ">
 | 
	
		
			
				|  |  | +                AND cu.user_id = #{companyUserId}
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <choose>
 | 
	
		
			
				|  |  | +                <when test = "isBlack">
 | 
	
		
			
				|  |  | +                    AND fu.status = 0
 | 
	
		
			
				|  |  | +                </when>
 | 
	
		
			
				|  |  | +                <otherwise>
 | 
	
		
			
				|  |  | +                    AND fu.status = 1
 | 
	
		
			
				|  |  | +                </otherwise>
 | 
	
		
			
				|  |  | +            </choose>
 | 
	
		
			
				|  |  | +            <if test="keyword != null and keyword !='' ">
 | 
	
		
			
				|  |  | +                AND (fu.nickname LIKE concat(#{keyword},'%')
 | 
	
		
			
				|  |  | +                OR fu.phone LIKE concat(#{keyword},'%')
 | 
	
		
			
				|  |  | +                )
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="registerStartTime != null and registerStartTime !='' ">
 | 
	
		
			
				|  |  | +                AND fu.create_time >= #{registerStartTime}
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="registerEndTime != null and registerEndTime !='' ">
 | 
	
		
			
				|  |  | +                AND fu.create_time <= #{registerEndTime}
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="tagIds != null and tagIds.length > 0">
 | 
	
		
			
				|  |  | +                AND EXISTS (
 | 
	
		
			
				|  |  | +                SELECT 1 FROM company_tag_user ctu2
 | 
	
		
			
				|  |  | +                WHERE fu.user_id = ctu2.user_id
 | 
	
		
			
				|  |  | +                AND (
 | 
	
		
			
				|  |  | +                <foreach collection="tagIds" item="item" index="index" separator="OR">
 | 
	
		
			
				|  |  | +                    ctu2.tag_ids LIKE concat(#{item},'"%')
 | 
	
		
			
				|  |  | +                </foreach>
 | 
	
		
			
				|  |  | +                )
 | 
	
		
			
				|  |  | +                )
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="tabValue != null and tabValue !='' ">
 | 
	
		
			
				|  |  | +                <choose>
 | 
	
		
			
				|  |  | +                    <when test = "tabValue == 1">
 | 
	
		
			
				|  |  | +                        AND DAY(fu.create_time) = DAY(NOW())
 | 
	
		
			
				|  |  | +                    </when>
 | 
	
		
			
				|  |  | +                    <when test = "tabValue == 2">
 | 
	
		
			
				|  |  | +                        AND DAY(fucc.complete_watch_date) = DAY(NOW())
 | 
	
		
			
				|  |  | +                    </when>
 | 
	
		
			
				|  |  | +                    <when test = "tabValue == 3">
 | 
	
		
			
				|  |  | +                        AND fucc.status = 3
 | 
	
		
			
				|  |  | +                    </when>
 | 
	
		
			
				|  |  | +                </choose>
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="watchCourseType != null and watchCourseType !='' ">
 | 
	
		
			
				|  |  | +                <choose>
 | 
	
		
			
				|  |  | +                    <when test = "watchCourseType == 1">
 | 
	
		
			
				|  |  | +                        AND fucc.status = 3
 | 
	
		
			
				|  |  | +                    </when>
 | 
	
		
			
				|  |  | +                    <when test = "watchCourseType == 2">
 | 
	
		
			
				|  |  | +                        AND fucc.status = 1
 | 
	
		
			
				|  |  | +                    </when>
 | 
	
		
			
				|  |  | +                    <when test = "watchCourseType == 3">
 | 
	
		
			
				|  |  | +                        AND fucc.status = 2
 | 
	
		
			
				|  |  | +                    </when>
 | 
	
		
			
				|  |  | +                </choose>
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="missCourseStatus != null and missCourseStatus !='' ">
 | 
	
		
			
				|  |  | +                <choose>
 | 
	
		
			
				|  |  | +                    <when test = "missCourseStatus == 1">
 | 
	
		
			
				|  |  | +                        AND fucc.miss_course_status = 1
 | 
	
		
			
				|  |  | +                    </when>
 | 
	
		
			
				|  |  | +                    <when test = "missCourseStatus == 2">
 | 
	
		
			
				|  |  | +                        AND fucc.miss_course_status = 2
 | 
	
		
			
				|  |  | +                    </when>
 | 
	
		
			
				|  |  | +                </choose>
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +        </where>
 | 
	
		
			
				|  |  | +    </select>
 | 
	
		
			
				|  |  | +    <select id="selectFsUserPageList" resultType="FsUserPageListVO">
 | 
	
		
			
				|  |  | +        SELECT
 | 
	
		
			
				|  |  | +        fs_user.*,
 | 
	
		
			
				|  |  | +        fs_user_course_count.id,
 | 
	
		
			
				|  |  | +        fs_user_course_count.watch_course_count,
 | 
	
		
			
				|  |  | +        fs_user_course_count.miss_course_count,
 | 
	
		
			
				|  |  | +        fs_user_course_count.miss_course_status,
 | 
	
		
			
				|  |  | +        fs_user_course_count.course_id,
 | 
	
		
			
				|  |  | +        fs_user_course_count.part_course_count,
 | 
	
		
			
				|  |  | +        fs_user_course_count.last_watch_date,
 | 
	
		
			
				|  |  | +        fs_user_course_count.STATUS AS courseCountStatus,
 | 
	
		
			
				|  |  | +        fs_user_course_count.stop_watch_days,
 | 
	
		
			
				|  |  | +        fs_user_course_count.complete_watch_date,
 | 
	
		
			
				|  |  | +        GROUP_CONCAT(DISTINCT company_tag.tag) AS tag,
 | 
	
		
			
				|  |  | +        GROUP_CONCAT(DISTINCT company_tag.tag_id) AS tagIds,
 | 
	
		
			
				|  |  | +        company_user.nick_name as companyUserNickName
 | 
	
		
			
				|  |  | +        FROM
 | 
	
		
			
				|  |  | +        fs_user
 | 
	
		
			
				|  |  | +        left join company_user on fs_user.company_user_id = company_user.user_id
 | 
	
		
			
				|  |  | +        LEFT JOIN fs_user_course_count ON fs_user.user_id = fs_user_course_count.user_id
 | 
	
		
			
				|  |  | +        LEFT JOIN company_tag_user ON fs_user.user_id = company_tag_user.user_id
 | 
	
		
			
				|  |  | +        LEFT JOIN company_tag ON FIND_IN_SET(company_tag.tag_id, company_tag_user.tag_ids) > 0
 | 
	
		
			
				|  |  | +        where (company_user.user_id = #{userId} OR company_user.parent_id = #{userId} )
 | 
	
		
			
				|  |  | +        where 1 = 1
 | 
	
		
			
				|  |  | +        <if test="userId != null and userId !='' ">
 | 
	
		
			
				|  |  | +            and (company_user.user_id = #{userId} OR company_user.parent_id = #{userId} )
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  | +        <if test="companyUserId != null and companyUserId !='' ">
 | 
	
		
			
				|  |  | +            and company_user.user_id = #{companyUserId}
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  | +        <choose>
 | 
	
		
			
				|  |  | +            <when test = "isBlack">
 | 
	
		
			
				|  |  | +                AND fs_user.status = 0
 | 
	
		
			
				|  |  | +            </when>
 | 
	
		
			
				|  |  | +            <otherwise>
 | 
	
		
			
				|  |  | +                AND fs_user.status = 1
 | 
	
		
			
				|  |  | +            </otherwise>
 | 
	
		
			
				|  |  | +        </choose>
 | 
	
		
			
				|  |  | +        <if test="keyword != null and keyword !='' ">
 | 
	
		
			
				|  |  | +            AND (fs_user.nickname LIKE concat(#{keyword},'%')
 | 
	
		
			
				|  |  | +            or  fs_user.phone LIKE concat(#{keyword},'%')
 | 
	
		
			
				|  |  | +            )
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  | +        <if test="registerStartTime != null and registerStartTime !='' ">
 | 
	
		
			
				|  |  | +            AND fs_user.create_time >= #{registerStartTime}
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  | +        <if test="registerEndTime != null and registerEndTime !='' ">
 | 
	
		
			
				|  |  | +            AND fs_user.create_time <= #{registerEndTime}
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  | +        <if test="tagIds != null and tagIds.length > 0">
 | 
	
		
			
				|  |  | +            AND
 | 
	
		
			
				|  |  | +            <foreach collection="tagIds" item="item" index="index" open="(" separator="or" close=")">
 | 
	
		
			
				|  |  | +                company_tag_user.tag_ids LIKE concat(#{item},'"%')
 | 
	
		
			
				|  |  | +            </foreach>
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  | +        <if test="tabValue != null and tabValue !='' ">
 | 
	
		
			
				|  |  | +            <choose>
 | 
	
		
			
				|  |  | +                <when test = "tabValue == 1">
 | 
	
		
			
				|  |  | +                    AND DAY(fs_user.create_time) = DAY(NOW())
 | 
	
		
			
				|  |  | +                </when>
 | 
	
		
			
				|  |  | +                <when test = "tabValue == 2">
 | 
	
		
			
				|  |  | +                    AND DAY(fs_user_course_count.complete_watch_date) = DAY(NOW())
 | 
	
		
			
				|  |  | +                </when>
 | 
	
		
			
				|  |  | +                <when test = "tabValue == 3">
 | 
	
		
			
				|  |  | +                    AND fs_user_course_count.status = 3
 | 
	
		
			
				|  |  | +                </when>
 | 
	
		
			
				|  |  | +            </choose>
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  | +        <if test="watchCourseType != null and watchCourseType !='' ">
 | 
	
		
			
				|  |  | +            <choose>
 | 
	
		
			
				|  |  | +                <when test = "watchCourseType == 1">
 | 
	
		
			
				|  |  | +                    AND fs_user_course_count.status = 3
 | 
	
		
			
				|  |  | +                </when>
 | 
	
		
			
				|  |  | +                <when test = "watchCourseType == 2">
 | 
	
		
			
				|  |  | +                    AND fs_user_course_count.status = 1
 | 
	
		
			
				|  |  | +                </when>
 | 
	
		
			
				|  |  | +                <when test = "watchCourseType == 3">
 | 
	
		
			
				|  |  | +                    AND fs_user_course_count.status = 2
 | 
	
		
			
				|  |  | +                </when>
 | 
	
		
			
				|  |  | +            </choose>
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  | +        <if test="missCourseStatus != null and missCourseStatus !='' ">
 | 
	
		
			
				|  |  | +            <choose>
 | 
	
		
			
				|  |  | +                <when test = "missCourseStatus == 1">
 | 
	
		
			
				|  |  | +                    AND fs_user_course_count.miss_course_status = 1
 | 
	
		
			
				|  |  | +                </when>
 | 
	
		
			
				|  |  | +                <when test = "missCourseStatus == 2">
 | 
	
		
			
				|  |  | +                    AND fs_user_course_count.miss_course_status = 2
 | 
	
		
			
				|  |  | +                </when>
 | 
	
		
			
				|  |  | +            </choose>
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        group by fs_user.user_id
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        <if test="continueMissCourseSort != null and continueMissCourseSort !='' ">
 | 
	
		
			
				|  |  | +            order by
 | 
	
		
			
				|  |  | +            <choose>
 | 
	
		
			
				|  |  | +                <when test = "continueMissCourseSort == 0">
 | 
	
		
			
				|  |  | +                    fs_user_course_count.miss_course_days desc
 | 
	
		
			
				|  |  | +                </when>
 | 
	
		
			
				|  |  | +                <when test = "continueMissCourseSort == 1">
 | 
	
		
			
				|  |  | +                    fs_user_course_count.miss_course_days asc
 | 
	
		
			
				|  |  | +                </when>
 | 
	
		
			
				|  |  | +                <when test = "continueMissCourseSort == 2">
 | 
	
		
			
				|  |  | +                    fs_user.create_time desc
 | 
	
		
			
				|  |  | +                </when>
 | 
	
		
			
				|  |  | +                <when test = "continueMissCourseSort == 3">
 | 
	
		
			
				|  |  | +                    fs_user.nickname asc
 | 
	
		
			
				|  |  | +                </when>
 | 
	
		
			
				|  |  | +            </choose>
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  | +    </select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  </mapper>
 |