当前位置: 代码迷 >> SQL >> Ibatis动态Sql语句 - iterator
  详细解决方案

Ibatis动态Sql语句 - iterator

热度:36   发布时间:2016-05-05 11:33:02.0
Ibatis动态Sql语句 -- iterator
引用


Ibatis动态Sql语句 -- iterator


需求:从查询列表中删除被选中记录(复选框)。


	String[] checkedIds = request.getParameterValues("checkId");        ...	List<String> paramList = new ArrayList<String>();	paramList = Arrays.asList(checkedIds);	sqlMapClientTemplate.delete("person.deletePersons", paramList);


	<delete id="deletePersons" parameterClass="list">		DELETE 		  FROM PERSON		 WHERE ID IN		 <iterate open="(" close=")" conjunction=",">		 	#[]#		 </iterate>	</delete>




  相关解决方案