<!-- 批量更新赛程 --> <update id="updateMatchs" parameterType="java.util.List"> <foreach collection="matchs" item="item" index="index" open="" close="" separator=";"> update t_match <set> <if test="item.title !=null"> TITLE = #{item.title,jdbcType=VARCHAR}, </if> <if test="item.homeScore !=null"> HOME_SCORE = #{item.homeScore,jdbcType=INTEGER}, </if> <if test="item.visitScore !=null"> VISTT_SCORE = #{item.visitScore,jdbcType=INTEGER}, </if> <if test="item.liveSource !=null"> LIVE_SOURCE = #{item.liveSource,jdbcType=VARCHAR}, </if> <if test="item.liveURL !=null"> LIVE_URL = #{item.liveURL,jdbcType=VARCHAR}, </if> <if test="item.isHotMatch !=null"> IS_HOT_MATCH = #{item.isHotMatch,jdbcType=VARCHAR} </if> </set> where HOME_TEAM_ID = #{item.homeTeamId,jdbcType=VARCHAR} and VISIT_TEAM_ID = #{item.visitTeamId,jdbcType=VARCHAR} and MATCH_TIME = #{item.matchTime,jdbcType=BIGINT} </foreach> </update>
mybitas 批量更新
最新推荐文章于 2024-07-15 06:44:37 发布