|
@@ -29,6 +29,7 @@
|
|
|
<select id="selectFsUserCoursePeriodList" parameterType="FsUserCoursePeriod" resultMap="FsUserCoursePeriodResult">
|
|
|
<include refid="selectFsUserCoursePeriodVo"/>
|
|
|
<where>
|
|
|
+ del_flag ='0'
|
|
|
<if test="periodName != null and periodName != ''"> and period_name like concat('%', #{periodName}, '%')</if>
|
|
|
<if test="companyId != null "> and FIND_IN_SET (#{companyId}, company_id ) > 0</if>
|
|
|
<if test="trainingCampId != null "> and training_camp_id = #{trainingCampId}</if>
|
|
@@ -64,6 +65,7 @@
|
|
|
left join fs_user_course_training_camp fctc on fctc.training_camp_id = fs_user_course_period.training_camp_id
|
|
|
left join company on FIND_IN_SET(company.company_id, fs_user_course_period.company_id) > 0
|
|
|
<where>
|
|
|
+ fs_user_course_period.del_flag ='0'
|
|
|
<if test="trainingCampId != null"> and fs_user_course_period.training_camp_id = #{trainingCampId}</if>
|
|
|
<if test="periodName != null and periodName != ''"> and period_name like concat('%', #{periodName}, '%')</if>
|
|
|
<if test="companyIdList != null and companyIdList.size() > 0 ">
|
|
@@ -82,7 +84,7 @@
|
|
|
|
|
|
<select id="selectFsUserCoursePeriodById" parameterType="Long" resultMap="FsUserCoursePeriodResult">
|
|
|
<include refid="selectFsUserCoursePeriodVo"/>
|
|
|
- where period_id = #{periodId}
|
|
|
+ where del_flag ='0' and period_id = #{periodId}
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertFsUserCoursePeriod" parameterType="FsUserCoursePeriod" useGeneratedKeys="true" keyProperty="periodId">
|
|
@@ -232,7 +234,7 @@
|
|
|
|
|
|
<select id="selectFsUserCoursePeriodsByIds" resultType="FsUserCoursePeriod">
|
|
|
select * from fs_user_course_period
|
|
|
- where period_id in
|
|
|
+ where del_flag ='0' and period_id in
|
|
|
<foreach collection="periodIds" item="item" open="(" separator="," close=")">
|
|
|
#{item}
|
|
|
</foreach>
|
|
@@ -242,20 +244,19 @@
|
|
|
select count(ucp.period_id)
|
|
|
from fs_user_course_period ucp
|
|
|
inner join fs_user_course_training_camp uctc on uctc.training_camp_id = ucp.training_camp_id
|
|
|
- where uctc.training_camp_id in
|
|
|
+ where ucp.del_flag ='0' and uctc.training_camp_id in
|
|
|
<foreach collection="params.ids" item="id" open="(" separator="," close=")">
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
<![CDATA[
|
|
|
- and ((ucp.period_starting_time <= #{params.date}
|
|
|
- and ucp.period_end_time >= #{params.date}
|
|
|
- ) or ucp.period_end_time < #{params.date})
|
|
|
+ and (ucp.period_starting_time <= #{params.date}
|
|
|
+ and ucp.period_end_time > #{params.date})
|
|
|
]]>
|
|
|
</select>
|
|
|
|
|
|
<select id="selectPeriodListByTrainingCampIds" resultType="FsUserCoursePeriod">
|
|
|
select * from fs_user_course_period
|
|
|
- where training_camp_id in
|
|
|
+ where del_flag ='0' and training_camp_id in
|
|
|
<foreach collection="trainingCampIds" item="item" open="(" separator="," close=")">
|
|
|
#{item}
|
|
|
</foreach>
|