If i understood what you are trying to do...
You can get rid of duplicated item with distinctBy()
YourList.distinctBy {
it.WHAT_EVER_YOU_WANT_TO_DISTINCT_BY // maybe by monkeysquad
})
This will give you the list you got from your SQL query without duplicated items
Hope i got it right
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.