|
|
@@ -4,6 +4,30 @@
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.fs.course.mapper.FsUserCourseTrainingCampMapper">
|
|
|
|
|
|
+ <select id="selectFsUserCourseTrainingCampVOListByMap_COUNT" parameterType="Map" resultType="Long">
|
|
|
+ select count(distinct ctc.training_camp_id)
|
|
|
+ from fs_user_course_training_camp ctc
|
|
|
+ left join fs_user_course_period ctp on ctc.training_camp_id = ctp.training_camp_id
|
|
|
+ <if test="params.userId != null and params.userId != ''">
|
|
|
+ left join fs_course_watch_log cu on cu.period_id = ctp.period_id
|
|
|
+ </if>
|
|
|
+ <where>
|
|
|
+ ctc.del_flag ='0'
|
|
|
+ <if test="params.trainingCampName != null and params.trainingCampName != ''">
|
|
|
+ and ctc.training_camp_name like concat('%',#{params.trainingCampName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="params.companyId != null and params.companyId != ''">
|
|
|
+ and ctp.company_id like concat('%',#{params.companyId},'%')
|
|
|
+ </if>
|
|
|
+ <if test="params.userIds != null and params.userIds != ''">
|
|
|
+ and ctc.user_id =#{params.userIds}
|
|
|
+ </if>
|
|
|
+ <if test="params.userId != null and params.userId != ''">
|
|
|
+ and cu.user_id = #{params.userId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
<!-- 查询训练营列表 -->
|
|
|
<select id="selectFsUserCourseTrainingCampVOListByMap" resultType="com.fs.course.vo.FsUserCourseTrainingCampVO">
|
|
|
select
|