package com.yccrc.kede.test;
import java.util.Arrays;
import java.util.List;

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.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.test.context.junit4.SpringRunner;

import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yccrc.generator.domain.*;
import com.yccrc.generator.service.IGenTableColumnService;
import com.yccrc.generator.service.IGenTableService;
import com.yccrc.kede.quartz.EnterpriseTask;
import com.yccrc.kede.service.IProjectService;

import lombok.extern.slf4j.Slf4j;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = com.yccrc.KedeApplication.class)
@Slf4j
public class ServiceTest {
	
	@Autowired
	IGenTableService genTableService;
	
	@Autowired
	IGenTableColumnService genTableColumnService;
	
	@Autowired
	IProjectService projectService;
	
	@Autowired
	EnterpriseTask enterpriseTask;
	
	@Test
	public void testService() {
		//System.out.println(JSON.toJSONString(projectService.getProject(5)));
		enterpriseTask.execExpiring();
	}
	
	public static void main(String args[]) {
		System.out.println(new BCryptPasswordEncoder().matches("123456", "$2a$10$15qBpSUgQSVhCSJQ91W5O.uewlYIA70RwFif0VqCUYT7S23Pq6y5S"));
	}
	
}