<?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="com.yida.data.user.mapper.EduUserDeviceFactoryMapper">
    <select id="existUserDeviceFactory"
            resultType="String">
        select group_concat(user_id,user_type)
        from edu_user_device_factory
        where
        <foreach collection="list" open="(" item="item" separator="or" close=")">
            (user_id = #{item.userId} and user_type =#{item.userType})
        </foreach>
        group by user_id,user_type
    </select>
</mapper>