mybatis+mysql批量插入存在即更新

insert into t_user_rank
	   (userID,flower,classID,rank)
	    values
	   
	       (#{item.userID},#{item.flower},#{item.classID},#{item.rank})
	   
	   on duplicate key update 
	   flower = values(flower),rank = values(rank)

你可能感兴趣的:(Java,mysql)