mysql 使用in查詢時,按照in內容排序

參考實例

@Query("from GoodsInfo f where f.deleteFlag = '0' and f.auditStatus in ('0', '3') and f.id in ?1 order by field(f.id, ?1)")
List<GoodsInfo> findByIdIn(List<Long> ids);
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章