其他分享
首页 > 其他分享> > mybatis注解版in查询

mybatis注解版in查询

作者:互联网

 

@Select({"<script> " +
            " select * "+
            " from business_threat bt \n" +
            " join abnormal_event_type aet on bt.event_type_id = aet.id " +
            " where 1=1 " +
            " <if test = ' ids != null'> " +
            " and bt.id in " +
            " <foreach item = 'item' index = 'index' collection = 'ids' open = '(' separator = ',' close = ')' > " +
            " #{item} " +
            " </foreach> " +
            " </if> " +
            "</script>"})
    List<BusinessThreatVO> getByBusinessThreadId(@Param("ids") List<Long> ids);

 

标签:aet,List,ids,查询,bt,mybatis,注解,type,id
来源: https://www.cnblogs.com/pxblog/p/14613000.html