Commit 02e50f2e authored by 李秀明's avatar 李秀明

fix: 修改错误SQL条件

parent e2311af4
...@@ -20,12 +20,17 @@ ...@@ -20,12 +20,17 @@
<if test="conditionColumn != null and conditionColumn != '' and conditionValue != null and conditionValue != ''"> <if test="conditionColumn != null and conditionColumn != '' and conditionValue != null and conditionValue != ''">
AND ${conditionColumn} = #{conditionValue} AND ${conditionColumn} = #{conditionValue}
</if> </if>
<if test="gatewayIds != null and gatewayIds.size() > 0"> <if test="gatewayIds != null">
<if test="gatewayIds.size() > 0">
AND GATEWAY_ID IN AND GATEWAY_ID IN
<foreach collection="gatewayIds" item="item" open="(" separator="," close=")"> <foreach collection="gatewayIds" item="item" open="(" separator="," close=")">
${item} ${item}
</foreach> </foreach>
</if> </if>
<if test="gatewayIds.size() == 0">
AND 1 = 2
</if>
</if>
GROUP BY GROUP BY
${column} ${column}
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment