例如下面这段代码
@Query("update BbsPost b set b.content = ?2,b.updateTime = current_timestamp where b.id = ?1")
@Modifying
void updatePostContent(Integer id, String content);
其中id 和 content 是对象Book的属性,我能把入参定义成Book么,就像
void updatePostContent(Book book);
如果可以,我的更新sql 如何写?
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号