Commit 32e82fcb authored by 梁光意's avatar 梁光意

添加判空条件

parent f5c6b5b9
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
</resultMap> </resultMap>
<delete id="batchUpdateGroupByIds"> <delete id="batchUpdateGroupByIds">
update instrument_panel_group set record_status =#{recordStatus} update instrument_panel_group set record_status =#{recordStatus}
<if test="groupIds!=null"> <if test="groupIds!=null and groupIds.size() > 0">
where id IN ( where id IN (
<foreach collection="groupIds" item="id" separator=","> <foreach collection="groupIds" item="id" separator=",">
#{id} #{id}
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
</select> </select>
<select id="selectGroupByIds" resultType="com.syc.slm.slmbi.vo.PanelTreeNodeVo"> <select id="selectGroupByIds" resultType="com.syc.slm.slmbi.vo.PanelTreeNodeVo">
select id,`name`,parent_id,'group' node_type from instrument_panel_group select id,`name`,parent_id,'group' node_type from instrument_panel_group
<if test="finalPanelIds!=null"> <if test="finalPanelIds!=null and finalPanelIds.size() > 0">
where id IN ( where id IN (
<foreach collection="finalPanelIds" item="id" separator=","> <foreach collection="finalPanelIds" item="id" separator=",">
#{id} #{id}
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</resultMap> </resultMap>
<update id="batchUpdatePanelByIds"> <update id="batchUpdatePanelByIds">
update instrument_panel set record_status =#{recordStatus} update instrument_panel set record_status =#{recordStatus}
<if test="panelIds!=null"> <if test="panelIds!=null and panelIds.size() > 0">
where id IN ( where id IN (
<foreach collection="panelIds" item="id" separator=","> <foreach collection="panelIds" item="id" separator=",">
#{id} #{id}
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
group_id parent_id, group_id parent_id,
'panel' node_type 'panel' node_type
from instrument_panel from instrument_panel
<if test="finalPanelIds!=null"> <if test="finalPanelIds!=null and finalPanelIds.size() > 0">
where id IN ( where id IN (
<foreach collection="finalPanelIds" item="id" separator=","> <foreach collection="finalPanelIds" item="id" separator=",">
#{id} #{id}
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
</resultMap> </resultMap>
<update id="batchUpdateTreeByIds"> <update id="batchUpdateTreeByIds">
update instrument_panel_tree set record_status =#{recordStatus} update instrument_panel_tree set record_status =#{recordStatus}
<if test="treeIds!=null"> <if test="treeIds!=null and treeIds.size() > 0">
where id IN ( where id IN (
<foreach collection="treeIds" item="id" separator=","> <foreach collection="treeIds" item="id" separator=",">
#{id} #{id}
......
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