<?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.cyksj.mapper.UpgradeOrderDonMapper">

    <select id="selectUpgradeDistinctGoodsId" resultType="java.lang.Long">
        select distinct goods_id from upgrade_order_don where user_id in
        <foreach collection="userIds" item="userId" open="(" separator="," close=")">
            #{userId}
        </foreach>
        and status not in ('close','noPayment','refund')
    </select>
</mapper>