批处理(mybatis删除、插入)

1、mapper.java

void batchDelete(Integer[] ids);//删除
int addUser(List UserList);//插入

2、mapper.xml

  
    delete from t_user where id in  
      
        #{item}  
      



 	insert into User(aid,aValue,aName)
   	values
 	
 		  (#{UserList.aid,jdbcType=VARCHAR},#{UserList.aValue,jdbcType=VARCHAR}, #{UserList.aName,jdbcType=VARCHAR})
 	

你可能感兴趣的:(Sql,Mybatis,批处理,mybatis)