JPA 中 in 的方法 注意参数一定要是List
可以是 List<String> 或者 List<int>
@Query(nativeQuery = true, value = "SELECT aea.`create_date` AS createTime, aadd.`remark`, aad.`data` FROM acb_electricity_alarm aea LEFT JOIN acb_alert_datas aad ON aad.`acb_electricity_alarm_id` = aea.`id` LEFT JOIN acb_alert_datas_dictionary aadd ON aadd.`id` = aad.`dictionary_id` " + "WHERE aea.`break_device_id` = ?1 AND DATEDIFF ( aea.`create_date` , ?2 ) = 0 AND aadd.`type` in ( ?3 ) ") List<Map<String,Object>> getDynamicCurveByDay(String breakDeviceId, String time, List<String> type);
jap 中如果要使用in 参数必须用list<>
https://www.yht7.com/news/6204 标签:acb,aadd,aad,JPA,List,aea,参数,id From: https://www.cnblogs.com/sunny3158/p/16831796.html