当前位置:Gxlcms > 数据库问题 > mybatis sql in not in的使用

mybatis sql in not in的使用

时间:2021-07-01 10:21:17 帮助过:328人阅读

select id="SelectAllByNotsampleNo" resultMap="BaseResultMap" parameterType="java.lang.String"> SELECT * FROM wshop_report1 a left join wshop_report_sms b on a.sampleno=b.sampleno where a.sampleno not in <foreach item="item" index="index" collection="list" open="(" separator="," close=")"> #{item} </foreach> </select>

service层

@Override
    public List<WshopReport1> SelectAllByNotsampleNo(List<String> sampleno) {
        
        return reportdao.SelectAllByNotsampleNo(sampleno);
    }

list对应List    array对应数组

mybatis sql in not in的使用

标签:open   resultmap   log   where   from   java   使用   port   amp   

人气教程排行