<?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.ozs.mapper.UserRegistrationidMapper">

    <update id="updateRegistrationID" parameterType="com.ozs.entity.UserRegistrationid">
        update user_registrationid
        <set>
            <if test="registrationId != null and registrationId != ''">
                registration_id = #{registrationId}
            </if>
        </set>
        where user_id = #{userId}
    </update>

    <select id="selectRegistrationID" resultType="java.lang.String" parameterType="java.util.List">
        select registration_id from user_registrationid where user_id in
        <foreach item="item" collection="userIdList" separator="," open="(" close=")" index="">
            #{item}
        </foreach>
    </select>
</mapper>
