|
|
|
@ -98,14 +98,17 @@ func DataExchange() {
|
|
|
|
|
}
|
|
|
|
|
//利用切片分批次上报
|
|
|
|
|
if len(list) > limit {
|
|
|
|
|
success:=PostToServer(t, list[0:limit])
|
|
|
|
|
success:=PostToServer(t, list[0:limit]) //0-99不包含100
|
|
|
|
|
if !success{
|
|
|
|
|
continue
|
|
|
|
|
}
|
|
|
|
|
count = count + limit
|
|
|
|
|
list = list[limit:]
|
|
|
|
|
} else if len(list) > 0 {
|
|
|
|
|
PostToServer(t, list)
|
|
|
|
|
success:=PostToServer(t, list)
|
|
|
|
|
if !success{
|
|
|
|
|
continue
|
|
|
|
|
}
|
|
|
|
|
count = count + len(list)
|
|
|
|
|
isFinish = true
|
|
|
|
|
} else {
|
|
|
|
|