标签:结束 strong 对象 过程 情况下 文件 指定 IV 封装
语法:
<foreach collection="ids" item= "item" index ="index" open= (" close =")" separator=","> #{item} </foreach >
<update id="updateByIds" parameterType="map"> update product set prod_status = #{record.prodStatus,jdbcType=CHAR}, up_down_time = #{record.upDownTime,jdbcType=TIMESTAMP} where id in <foreach collection="ids" item= "item" index ="index" open= (" close =")" separator=","> #{item} </foreach > </update>
1. 数组
int updateByIds(@Param("record") Product record,@Param("ids") String ids[]);
2. List
int updateByIds(@Param("record") Product record,@Param("ids") List<String> ids);
3. Map,把多个参数放到map中
int updateByIds(Map map);
标签:结束 strong 对象 过程 情况下 文件 指定 IV 封装
原文地址:https://www.cnblogs.com/wslook/p/9185534.html