mybatis 傳入list 循環

  SELECT * from lp_customer_info where 1=1
        <if test="ids.size() > 0">
            and id in
            <foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
                #{item}
            </foreach>
        </if>
 IPage<QueryDeliveryPeopleDTO> queryDeliveryPeopleList(Page page, @Param("ids") List<Long> ids);

傳入的 類型要爲 list ,  要是傳入set 集合  會有問題

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章