魏超 před 5 roky
rodič
revize
560191ebf5
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 4
    1
      src/main/resources/mapper/TaBuildingMapper.xml

+ 4
- 1
src/main/resources/mapper/TaBuildingMapper.xml Zobrazit soubor

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