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

添加判空条件

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