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);