Commit d609d800 by tc

fix bug

parent 86ae8468
......@@ -70,18 +70,21 @@ public class ListUtils {
}
public static <T> List<T>groupList4SQL(ListForInSQL<T> listForInSQL,List<Long>idList){
if(idList==null || idList.size()==0){
return new ArrayList<>();
}
HashSet<Long>idSet = new HashSet<>(idList);
idList.clear();
idList.addAll(idSet);
List<T>result = new ArrayList<>();
if(idList!=null && idList.size()>500){
if(idList.size()>500){
List<List<Long>> lists = groupList(idList);
for (List<Long> list : lists) {
List<T> tempList = listForInSQL.processSQL(list);
result.addAll(tempList);
}
return result;
}else if(idList != null && idList.size()>0){
}else if(idList.size()>0){
return listForInSQL.processSQL(idList);
}else{
return new ArrayList<>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment