欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

mybatis 记录

程序员文章站 2022-07-03 11:05:51
删除list集合 **Mapper.xml **Mapper ......

  

删除list集合 

 **Mapper.xml

  <delete id="deleteBackstageRecommend" parameterType="java.util.List">
        delete from backPersonConfig
        where (agentCode,guaranteeType) in
        <foreach collection="list" item="item" index="index" separator="," open="(" close=")">
            (#{item.agentCode},#{item.guaranteeType})
        </foreach>
   </delete>

**Mapper

 /**
     * 删除推荐产品
     * @param backPersonConfig
     */
    public void deleteBackstageRecommend(List<BackPersonConfig> backPersonConfig);