| 2018.4.30 | SpringBoot |
@Modifying
@Query("update Secondment s set s.fstate=?3 where s.fid in(?1) and s.fstate=?2")
public void enable(List<String> ids, String stateFrom, String stateTo);
List中有2条记录时,打印的SQL语句如下:
update CM_Secondment set fstate=? where (fid in (? , ?)) and fstate=?
binding parameter [1] as [VARCHAR] - [已确认]
binding parameter [2] as [VARCHAR] - [8D3AE98FED77439BB9F45A0EFB86AFC5]
binding parameter [3] as [VARCHAR] - [BF30A7B0262F40B5A76138197FE78B73]
binding parameter [4] as [VARCHAR] - [未确认]
更新列表:
*
参考文章:
[2]: