package com.chy.borrow.service;

import com.chy.borrow.controller.BorrowApplyController;
import com.chy.borrow.controller.BorrowApplyZjl0754Controller;
import com.chy.borrow.controller.StatisticsController;
import com.chy.borrow.entity.BorrowApply;
import com.chy.borrow.entity.BorrowApplyZjl0754;
import com.chy.borrow.entity.BorrowExamine;
import com.chy.borrow.service.impl.BorrowExamineServiceImpl;
import org.checkerframework.checker.units.qual.A;
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.SpringRunner;

import java.util.HashMap;
import java.util.Map;

/**
 * @author ：沈晔浩
 * @date ：Created in 2022/3/10 15:40
 * @description：
 */
@RunWith(SpringRunner.class)
@SpringBootTest
public class SpringTest {
    @Autowired
    TmpCodeService tmpCodeService;

    @Autowired
    BorrowExamineServiceImpl borrowExamineService;

    @Autowired
    BorrowApplyZjl0754Controller borrowApplyZjl0754Controller;

    @Autowired
    BorrowApplyController borrowApplyController;

    @Autowired
    StatisticsService statisticsService;
    @Autowired
    StatisticsController statisticsController;

    @Test
    public void test1(){
        Map map = new HashMap();
        map.put("queryType","1");
        map.put("queryDate","2022");
        statisticsController.statisticsByUser("88",map);
    }
    @Test
    public void test2(){
        Map map = new HashMap();
        map.put("code","bh2022010001");
        System.out.println(borrowApplyController.getBorrowApplyId());
    }


    @Test
    public void test(){
        BorrowApplyZjl0754 borrowApplyZjl0754 = new BorrowApplyZjl0754();
        borrowApplyZjl0754.setBorrowApplyId("1509358025264201728");
        borrowApplyZjl0754Controller.getWord(borrowApplyZjl0754);
    }

    @Test
    public void contextLoads() {
        //"1511515546699563008"
        //"1510162568109490176"
        //"1508363227682177024"
        //"1510206372766154752"
        //"1507251662430011392"
        BorrowExamine borrowExamine = new BorrowExamine();
        borrowExamine.setBorrowApplyId("1510162568109490176");
        borrowExamineService.download(borrowExamine);
        borrowExamine.setBorrowApplyId("1511515546699563008");
        borrowExamineService.download(borrowExamine);
        borrowExamine.setBorrowApplyId("1508363227682177024");
        borrowExamineService.download(borrowExamine);
        borrowExamine.setBorrowApplyId("1510206372766154752");
        borrowExamineService.download(borrowExamine);
        borrowExamine.setBorrowApplyId("1507251662430011392");
        borrowExamineService.download(borrowExamine);
//        Map map = new HashMap();
//        map.put("current",1);
//        map.put("pageSize",10);
//        tmpCodeService.getList(map);
//        System.out.println(tmpCodeService.list());
    }
}
