Просмотр исходного кода

Merge branch 'v3.5.1' of http://git.ycjcjy.com/zhiyuxing/estateagents into v3.5.1

胡轶钦 5 лет назад
Родитель
Сommit
1f16a3fefa
1 измененных файлов: 4 добавлений и 1 удалений
  1. 4
    1
      src/main/resources/mapper/TaBuildingMapper.xml

+ 4
- 1
src/main/resources/mapper/TaBuildingMapper.xml Просмотреть файл

@@ -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>