int listSize = authKeyIds.size();
int toIndex = 10000;
List> myList = new ArrayList<>();
for (int i = 0; i
//作用为toIndex最后没有toIndex条数据则剩余几条newList中就装几条
if (i + 10000 > listSize) {
toIndex = listSize - i;
}
//分割lst
List newList = authKeyIds.subList(i, i + toIndex);
//写入myList,把newList分切后的数据新增进入数据库。
myList.add(newList);
}
testDao.getListByApiKeys(myList); //dao层
SELECT API_KEY AS apiKey, SYSTEM_NAME AS systemName FROM SYS_USER_AUTHKEY #{key}



