|
|
@@ -3,6 +3,8 @@ package com.goafanti.common.utils;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
+import org.thymeleaf.expression.Lists;
|
|
|
+
|
|
|
import com.goafanti.demand.bo.DemandListBo;
|
|
|
|
|
|
public class LimitLengthUtil {
|
|
|
@@ -97,6 +99,7 @@ public class LimitLengthUtil {
|
|
|
public static <T>List<T> LimitListLengthRandomly(List<T> list,int count,int queryLength)
|
|
|
{
|
|
|
int truelyQueryLength=Math.min(list.size(), queryLength);
|
|
|
+ if(list==null || list.size()<=0)return list;
|
|
|
int[] randomInts=RandomUtil.generateRandomList(truelyQueryLength, count);
|
|
|
if(list==null || list.size()<=count)return list;
|
|
|
else {
|