<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="cn.kk.spring_simple_operation.mapper.BrandRecordToolMapper"> <select id="getByBrandAndAccount" resultType="cn.kk.spring_simple_operation.entity.BrandRecordTool"> select id, account, record_brand, brand_id from brand_record_tool where is_delete = 0 and ( account, record_brand) in <foreach collection="list" item="item" open="(" separator="," close=")"> (#{item.account}, #{item.brand}) </foreach> </select> </mapper>