# 更新

## 更新用户数

```java
@Autowired
private UserCountService userCountService;

@Test
void test2() {
    String path = "/home/lfq/Documents/code/tsl-data/doc/数据订阅/客户提供/abc.txt";
    List<String> lines = TextUtil.readLines(path);
    lines.forEach(
        line -> {
            String[] split = line.split("\t");
            userCountService.updateManagementUserCount("202401", split[0], Double.parseDouble(split[2]));
            System.out.println(Arrays.toString(split));
        }
    );
}
```

## 更新移网感知万投比

```java
@Autowired
private TargetTsRatioMapper targetTsRatioMapper;

@Test
void test2() {
    String path = "/home/lfq/Documents/code/tsl-data/doc/数据订阅/客户提供/abc.txt";
    List<String> lines = TextUtil.readLines(path);
    lines.forEach(line -> {
        String[] split = line.split("\t");
        String city = split[0];
        for (int i = 1; i < split.length; i++) {
            String month = "2024" + (i >= 10 ? i : "0" + i);
            double target = Double.parseDouble(split[i]);
            System.out.println(city + "==" + month + "==" + target);
            targetTsRatioMapper.updateManagementTargetRatio(month, city, target);
        }
    });
}
```

## 更新移网感知服务请求率 service_request_target_ratio

```java
@Autowired
private TargetTsRatioMapper targetTsRatioMapper;

@Test
void test2() {
    String path = "/home/lfq/Documents/code/tsl-data/doc/数据订阅/客户提供/abc.txt";
    List<String> lines = TextUtil.readLines(path);
    lines.forEach(line -> {
        String[] split = line.split("\t");
        String city = split[0];
        for (int i = 1; i < split.length; i++) {
            String month = "2024" + (i >= 10 ? i : "0" + i);
            double target = Double.parseDouble(split[i]);
            System.out.println(city + "==" + month + "==" + target);
            targetTsRatioMapper.updateServiceRequestTargetRatio(month, city, target);
        }
    });
}
```
