public void uploadLaneInfo(Config config) { List<LaneInfo> all = simpleMapper.getAllLaneInfo(); logger.info("共查到" + all.size() + "条LI数据"); int base = 0; for (; ; ) { int total = simpleMapper.getTotalNumber("BMS_LANE_INFO"); if (total > base) { logger.info("新增" + (total - base) + "条LI数据"); all = simpleMapper.getAllLaneInfo(); List<LaneInfo> xz = all.subList(base, total); upload(xz, "BMS_LANE_INFO", config); } base = total; try { Thread.sleep(10000); } catch (InterruptedException e) { logger.error(e.getMessage()); } } }