puzhibing
2023-02-25 4ba348b700fd7f461f754a283eaeeba3fc9ff36c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//package com.supersavedriving.driver;
//
//import com.supersavedriving.driver.modular.system.model.WeatherCity;
//import com.supersavedriving.driver.modular.system.service.IWeatherCityService;
//import com.supersavedriving.driver.modular.system.util.juhe.WeatherCityInfo;
//import com.supersavedriving.driver.modular.system.util.juhe.WeatherUtil;
//import org.junit.Test;
//import org.junit.runner.RunWith;
//import org.springframework.beans.BeanUtils;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.test.context.SpringBootTest;
//import org.springframework.test.context.junit4.SpringRunner;
//
//import java.util.ArrayList;
//import java.util.List;
//
//@RunWith(SpringRunner.class)
//@SpringBootTest
//public class GunsApplicationTest {
//
//    @Autowired
//    private IWeatherCityService weatherCityService;
//
//
//    @Test
//    public void test(){
//        List<WeatherCityInfo> weatherCities = WeatherUtil.queryCityList();
//        List<WeatherCity> list = new ArrayList<>();
//        for (WeatherCityInfo weatherCityInfo : weatherCities) {
//            WeatherCity weatherCity1 = new WeatherCity();
//            BeanUtils.copyProperties(weatherCityInfo, weatherCity1);
//            list.add(weatherCity1);
//        }
//        weatherCityService.insertBatch(list);
//    }
//}