MyBatis批量删除写法

1、DAO层接口
void deleteAll(@Param("ids")List ids);	
2、Mapper文件

		update ems_emp set status=0 where id in
		
			#{id} 
		
	
3、Action
private List ids;
public List getIds() {
		return ids;
	}
	public void setIds(List ids) {
		this.ids = ids;
	}
public String deleteAll(){
		if(ids==null)return "deleteFail";
		else{
			List idss = new ArrayList();
			for(int i=0;i
4、jsp

你可能感兴趣的:(MyBatis批量删除写法)