用户更新
@Autowired
private UserCountService userCountService;
/**
* 更新管理端用户数--当前阶段需要修改一下模式
*/
@Test
void test1() throws IOException {
String path = "D:/src/管理端用户数.txt";
Files.lines(Paths.get(path), StandardCharsets.UTF_8)
.forEach(line -> {
String[] split = line.split("\t");
System.out.println(split[0] + Double.parseDouble(split[2]));
userCountService.updateManagementUserCount("202311", split[0], Double.parseDouble(split[2]));
});
}
/**
* 更新客户端用户数
*/
@Test
void test2() throws IOException {
String path = "D:/src/客户端用户数.txt";
Files.lines(Paths.get(path), StandardCharsets.UTF_8)
.forEach(line -> {
String[] split = line.split("\t");
System.out.println(split[0] + Double.parseDouble(split[1]));
userCountService.updateCustomerUserCount("202311", split[0], Double.parseDouble(split[1]));
});
}