@@ -201,7 +201,10 @@
</select>
<select id="countNumByHeavy" resultType="java.lang.Integer">
- select COUNT(1) from ta_building_dynamic t where t.heavy = #{heavy} and t.dynamic_id != #{dynamicId}
+ select COUNT(1) from ta_building_dynamic t where t.heavy = #{heavy}
+ <if test="dynamicId != null and dynamicId != ''">
+ and t.dynamic_id != #{dynamicId}
+ </if>
</mapper>