Commit a5757709 authored by maoying's avatar maoying

修改sql where写法

parent e9b75c08
...@@ -256,8 +256,7 @@ ...@@ -256,8 +256,7 @@
frs.name riskSourceName frs.name riskSourceName
from f_fire_equipment fe from f_fire_equipment fe
left join f_risk_source frs on frs.id = fe.risk_source_id left join f_risk_source frs on frs.id = fe.risk_source_id
where <where>
1=1
<if test="equipClassify!=null"> <if test="equipClassify!=null">
and fe.equip_classify in ( ${equipClassify} ) and fe.equip_classify in ( ${equipClassify} )
</if> </if>
...@@ -268,6 +267,7 @@ ...@@ -268,6 +267,7 @@
<if test="name!=null"> <if test="name!=null">
and (fe.`name` like '%${name}%' or fe.`code` like '%${name}%') and (fe.`name` like '%${name}%' or fe.`code` like '%${name}%')
</if> </if>
</where>
LIMIT ${start},${length} LIMIT ${start},${length}
</select> </select>
...@@ -301,8 +301,9 @@ ...@@ -301,8 +301,9 @@
FROM FROM
f_equipment eq f_equipment eq
LEFT JOIN f_fire_station fs ON fs.id = eq.fire_station_id LEFT JOIN f_fire_station fs ON fs.id = eq.fire_station_id
WHERE 1=1 <where>
<if test="id!=null">AND eq.id = #{id}</if> <if test="id!=null">AND eq.id = #{id}</if>
</where>
</select> </select>
<select id="findAllEquipPointInfo" resultType="com.yeejoin.amos.fas.business.vo.EquipCommunicationData"> <select id="findAllEquipPointInfo" resultType="com.yeejoin.amos.fas.business.vo.EquipCommunicationData">
......
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