int listSize = authKeyIds.size();
int toIndex = 10000;
List<List<String>> myList = new ArrayList<>();
for (int i = 0; i <listSize; i += 10000) {
if (i + 10000 > listSize) {
toIndex = listSize - i;
}
List<String> newList = authKeyIds.subList(i, i + toIndex);
myList.add(newList);
}
testDao.getListByApiKeys(myList);
<select id="getListByApiKeys" parameterType="java.util.ArrayList" resultType="cc.ewell.imsp.adminserver.dto.res.SysUserAuthKeyRes">
SELECT API_KEY AS apiKey, SYSTEM_NAME AS systemName FROM SYS_USER_AUTHKEY
<where>
<if test="apiKeys != null and apiKeys.size() > 0
">
<foreach collection="apiKeys" item="apiKey" open="API_KEY IN"
separator="or API_KEY IN">
<foreach collection="apiKey" item="key" open="(" close=")" separator=",">
#{key}
</foreach>
</foreach>
</if>
</where>
</select>