//先获取对方数据总数
int size = list.size;
//一次存量
int count = 5000;
//执行数
int counts = size / count;
//取余,如果大于1,就再加一
int yu = size % count;
if (yu > 0) {
counts += 1;
}
String sql ="";
List<ssData> List = new ArrayList<>();
for(int i=1;i<= counts; i++){
//截取,分批保存(重点)
sql ="SELECT * FROM Table_name where time BETWEEN '"+startStr+"' and '" +endStr+"' limit 5000 offset "+ count*(i-1);
ResultVO resultVO = Service.fetchData(sql, token);
if (resultVO.getCode() != ResultCode.SUCCESS) {
//失败的话 重试校验
for(int times = 0;times <5;times++){
ResultVO res = Service.fetchData(sql, token);
if(res.getCode() != ResultCode.SUCCESS){
if (times >= 5) {
logger.error("拉取业务数据失败第["+times+"]次");