package com.example.repurchase;

import com.example.repurchase.getTags.CalculateHousePriceTags;
import com.example.repurchase.getTags.CalculateRFMTags;
import com.example.repurchase.getTags.CalculateRepurchaseUserTags;
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.io.IOException;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.concurrent.BrokenBarrierException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;


@RunWith(SpringRunner.class)
@SpringBootTest
public class RepurchaseApplicationTests {

    @Autowired
    private CalculateHousePriceTags calculateHousePriceTags;

    @Autowired
    private CalculateRFMTags calculateRFMTags;

    @Autowired
    CalculateRepurchaseUserTags calculateRepurchaseUserTags;

    @Test
    void contextLoads() throws Exception {
//        for(int i=0;i<20;i++){
//            calculateHousePriceTags.runGetHouseTagsMultiThread(15,100);
//        }
//        calculateRepurchaseUserTags.getRepurchaseUserByMonth("2020-04");
//        calculateHousePriceTags.runGetHouseTagsMultiThread(15,100);
//        calculateHousePriceTags.threadCalculateHousePriceTags(1,10);
//        System.out.println(BaiDuMapUnit.getLatLng("北京通州区中仓街道五环到六环之间北京通州区通州城区内运河明珠小区10号楼311室", 1));
        calculateRFMTags.calculateRFMTags();
//        calculateHousePriceTags.threadCalculateHousePriceTags(0,3);
    }

}
