|
|
@@ -32,6 +32,10 @@
|
|
|
WHERE t.flg_valid
|
|
|
AND now() >= t.start_date
|
|
|
AND (t.end_date IS NULL OR t.end_date >= now())
|
|
|
+ AND (t.cp_ids IS NULL OR #{cpId} = ANY(t.cp_ids))
|
|
|
+ <if test="gradeCode != null and gradeCode != ''">
|
|
|
+ AND (t.grade_codes IS NULL OR #{gradeCode} = ANY(t.grade_codes))
|
|
|
+ </if>
|
|
|
<if test="appCode != null and appCode != ''">
|
|
|
And t.app_code = #{appCode}
|
|
|
</if>
|