<delete id="removePlan" > delete from tbl_plan where P_no in <foreach collection="list" index="index" item="pNo" open="(" separator="," close=")"> #{pNo} </foreach> </delete>
1 回答
已采纳
你好小Song
TA贡献29条经验 获得超10个赞
需要对list进行判空.
<delete id="removePlan" parameterType="List"> delete from tbl_plan <if test="list!=null"> <where> P_no in <foreach item="pNo" collection="list" open="(" separator="," close=")"> #{pNo} </foreach> </where> </if> </delete>
添加回答
举报
0/150
提交
取消