(1)一个一个传入参数
@Update("UPDATE idea SET idea.like=#{like1} where id=#{ideaId}")
int updateIdeaLikeNumber(@Param("like1") int like1, @Param("ideaId") int ideaId);
(2)传入一个对象:传入对象时,不需要加@Param,因为会直接取对象中的属性
public interface KnowSayMapper {
@Insert("INSERT INTO knowSaying (createTime,label,bookName,author,excitingClips,content,userId) VALUES (#{createTime},#{label},#{bookName},#{author},#{excitingClips},#{content},#{userId})")
@Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
int addKnowSay(KnowSay knowSay);
}