Commit 594a2397 authored by wujipeng's avatar wujipeng
Browse files

优化

parent 50babf4d
...@@ -13,18 +13,20 @@ ...@@ -13,18 +13,20 @@
rel_id rel_id
from from
defect defect
where <where>
rel_id <if test="relIds != null and relIds.size() > 0">
in rel_id in
<foreach item="item" index="index" collection="relIds" open="(" separator="," close=")"> <foreach item="item" index="index" collection="relIds" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
</if>
<if test="defectType != null and defectType != ''"> <if test="defectType != null and defectType != ''">
and type = #{defectType} and type = #{defectType}
</if> </if>
<if test="lev != null and lev != ''"> <if test="lev != null and lev != ''">
and level = #{lev} and level = #{lev}
</if> </if>
</where>
</select> </select>
<select id="queryByRoadName" resultType="com.example.pipelinenetwork.pojo.entity.DefectEntity"> <select id="queryByRoadName" resultType="com.example.pipelinenetwork.pojo.entity.DefectEntity">
select select
......
...@@ -14,18 +14,20 @@ ...@@ -14,18 +14,20 @@
rel_id rel_id
from from
repair repair
where <where>
rel_id <if test="relIds != null and relIds.size() > 0">
in rel_id in
<foreach item="item" index="index" collection="relIds" open="(" separator="," close=")"> <foreach item="item" index="index" collection="relIds" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
</if>
<if test="defectType != null and defectType != ''"> <if test="defectType != null and defectType != ''">
and type = #{defectType} and type = #{defectType}
</if> </if>
<if test="lev != null and lev != ''"> <if test="lev != null and lev != ''">
and level = #{lev} and level = #{lev}
</if> </if>
</where>
</select> </select>
<select id="queryByRoadName" resultType="com.example.pipelinenetwork.pojo.entity.RepairEntity"> <select id="queryByRoadName" resultType="com.example.pipelinenetwork.pojo.entity.RepairEntity">
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