|
@@ -295,12 +295,14 @@
|
|
|
exam_organization_relation eor
|
|
|
LEFT JOIN examination_basic eb ON eor.examination_basic_id_ = eb.id_
|
|
|
WHERE status_ IN ( 'APPLYING', 'APPLIED' )
|
|
|
- AND (eor.organ_id_ = #{organId}
|
|
|
- OR eb.organ_id_ IN
|
|
|
- <foreach collection="organIds" item="organId" separator="," open="(" close=")">
|
|
|
- #{organId}
|
|
|
- </foreach>
|
|
|
- )
|
|
|
+ <if test="organId!=null">
|
|
|
+ AND (eor.organ_id_ = #{organId}
|
|
|
+ OR eb.organ_id_ IN
|
|
|
+ <foreach collection="organIds" item="organId" separator="," open="(" close=")">
|
|
|
+ #{organId}
|
|
|
+ </foreach>
|
|
|
+ )
|
|
|
+ </if>
|
|
|
ORDER BY
|
|
|
create_time_ DESC
|
|
|
LIMIT 6;
|
|
@@ -314,9 +316,11 @@
|
|
|
examination_basic
|
|
|
WHERE
|
|
|
status_ NOT IN ( 'CLOSE', 'DELETE' )
|
|
|
- AND organ_id_ IN
|
|
|
- <foreach collection="organs" item="organ" separator="," open="(" close=")">
|
|
|
- #{organ}
|
|
|
- </foreach>
|
|
|
+ <if test="organIds!=null">
|
|
|
+ AND organ_id_ IN
|
|
|
+ <foreach collection="organIds" item="organId" separator="," open="(" close=")">
|
|
|
+ #{organId}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
</select>
|
|
|
</mapper>
|