|
@@ -46,6 +46,12 @@
|
|
|
LEFT JOIN xjr_department t4 ON t1.org_id = t4.id
|
|
|
LEFT JOIN activity_enroll t5 ON t1.id = t5.activity_info_id
|
|
|
WHERE t1.delete_mark = 0 AND t5.user_id = #{dto.loginUserId}
|
|
|
+ <if test="dto.category != null">
|
|
|
+ and t1.category = #{dto.category}
|
|
|
+ </if>
|
|
|
+ <if test="dto.isEffective != null and dto.isEffective == 1">
|
|
|
+ and (t1.status = 1 or t1.status = 2) and NOW() between t1.start_date and t1.end_date
|
|
|
+ </if>
|
|
|
UNION
|
|
|
SELECT a1.id, a1.club_activities_name AS NAME, 1 AS enroll_status,
|
|
|
a1.club_activities_content AS content,
|
|
@@ -63,11 +69,5 @@
|
|
|
(a2.attend_teacher = #{dto.loginUserId} OR a2.attend_class IN (
|
|
|
SELECT class_id FROM base_student_school_roll WHERE user_id = #{dto.loginUserId}
|
|
|
))
|
|
|
- <if test="dto.category != null">
|
|
|
- and t1.category = #{dto.category}
|
|
|
- </if>
|
|
|
- <if test="dto.isEffective != null and dto.isEffective == 1">
|
|
|
- and (t1.status = 1 or t1.status = 2) and NOW() between t1.start_date and t1.end_date
|
|
|
- </if>
|
|
|
</select>
|
|
|
</mapper>
|