mybatis list查询,mybatis批量删除list

  mybatis list查询,mybatis批量删除list

  

目录

根据目录批量查询目录结果制图人接口mapper.xml文件根据多条件目录查询制图人文件数据访问对象(数据访问对象)片段

 

  

根据List批量查询List结果

 

  

mapper接口

/*** 根据剧典编号列表查询剧典*/public list drama select byids(@ Param( drama id )list long drama id);

 

  

mapper.xml文件

!-根据剧典编号列表查询剧典-select id= select byids 结果映射= drama image result map select * from drama where drama _ id in foreach collection= drama ids item= drama id open=( close=) separator=, # { drama id }/foreach/select数组参数

 

  //接口方法ArrayListUser selectByIds(Integer[]ids);//xml映射文件select id= selectByIds 结果映射=基本结果映射 select * from user其中foreach中的id item= item index= index collection= array open=( separator=, close=) # { item }/foreach/selectList参数

  //接口方法ArrayListUser selectByIds(列表整数id);//xml映射文件Select ID= selectByIds 结果映射=基本结果映射 Select include refid= Base _ Column _ List /from jria其中foreach中的ID item= item index= index collection= List open=( separator=, close=) # { item }/foreach/Select

  

根据多条件List查询

 

  

mapper文件

select id= select where 结果映射= Base result map select include refid= Base _ Column _ List /from table where table。a=a和桌子。b在foreach collection= List item= item index= index open=( separator=, close=) $ { item } /foreach/where/select

 

  

DAO片段

ListT select where(@ Param( list )ListString list,@ Param( a )String a);以上为个人经验,希望能给大家一个参考,也希望大家多多支持盛行它。

 

郑重声明:本文由网友发布,不代表盛行IT的观点,版权归原作者所有,仅为传播更多信息之目的,如有侵权请联系,我们将第一时间修改或删除,多谢。

留言与评论(共有 条评论)
   
验证码: