CustomerStatisticsServiceTest.java 1.08 KB
package cn.com.glsx.entmicro.service;

import cn.com.glsx.entmicro.Main;
import org.junit.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.SpringJUnit4ClassRunner;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;


@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = Main.class)
public class CustomerStatisticsServiceTest {

    @Autowired
    private CustomerStatisticsService customerStatisticsService;

    @Test
    public void getStoreCollectViewActual() {
        try {
            List<Integer> list = new ArrayList<>();
            list.add(44209846);
            String s = "2022-01-20";
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
            Date date = sdf.parse(s);
            customerStatisticsService.getStoreCollectViewActual(date, list);
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}