mybatis 標籤

在查看好友動態的需求裏用到過

<select id="selectConcernDynamicByPage" parameterType="DynamicListOption"
        resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List"/>
    <if test="userIds !=null">
        AND  user_id in
        <foreach collection="userIds" index="index" item="item" open="(" separator="," close=")">
            #{item}
        </foreach>
    </if>

</select>


DynamicListoption裏寫了

private List<Long> userIds;

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