@@ -95,11 +95,14 @@
FROM
t_u_event_fire d
WHERE
- DEPT_ID IN (
- <include refid="Depts">
- <property name="dept_id" value="#{dept_id}"/>
- </include>
- )
+ 1=1
+ <if test="dept_id != null and dept_id != ''">
+ DEPT_ID IN (
+ <include refid="Depts">
+ <property name="dept_id" value="#{dept_id}"/>
+ </include>
+ )
+ </if>
${params.dataScope}
UNION
SELECT