为什么我的循环只走一次,只导出同一天同一个的第一次查询的记录,应该是导出同一天同一个人的所有记录

private Runnable dodownload() throws IOException {
return new Runnable() {
@Override
public void run() {
String basepath = getResourceBasePath();
List tfeepaids = getTfeepaidByTime();
String timeName = getOneDayForDown();
String KjDownResourcePath = "";
String id = "";
for (Tfeepaid tfeepaid : tfeepaids) {
id = tfeepaid.getFcertid();
KjDownResourcePath = new File(basepath, "down/" + id + "-" + timeName + ".txt").getAbsolutePath();
ensureDirectory(KjDownResourcePath);
StringBuffer sb = new StringBuffer();
sb.append(tfeepaid.getFlastcommit());
sb.append("\t");
sb.append("\r\n");
// TODO 其他数据据字段的设置20190314
try {
BufferedWriter bw = new BufferedWriter(
new OutputStreamWriter(new FileOutputStream(KjDownResourcePath)));
bw.write(sb.toString());
bw.flush();
bw.close();
} catch (IOException e) {
e.printStackTrace();
}

            }

        }
    };
}


HUWWW
浏览 347回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java