/**
 * Copyright 2008-2009. Chongqing Communications Industry Services Co.,Ltd Information Technology Branch. All rights reserved. <a>http://www.crunii.com</a>
 */
package com.crunii.micro.api.test;

import com.crunii.micro.domain.repo.main.TsmEncryptTestRepo;
import com.crunii.micro.service.sysmgr.jdbc.EncryptTestJdbcDao;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

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

/**
 * @author 田平 create 2019年6月14日上午11:28:58
 */
public class EncryptTest extends SysmgrBaseTest {

	@Autowired
	private TsmEncryptTestRepo tsmEncryptRepo;

	@Autowired
	private EncryptTestJdbcDao encryptTestJdbcDao;

	@Test
	public void testget() {
		System.out.println(tsmEncryptRepo.getOne(1));
	}

	@Test
	public void testFind() {
		System.out.println(tsmEncryptRepo.findByProp("id", 1));
	}

	@Test
	public void testFind1() {
		Map<String, Object> props = new HashMap<String, Object>();
		props.put("id", 1);
		System.out.println(tsmEncryptRepo.findByProps(props));
	}

	@Test
	public void testJDBC() {
		System.out.println("1:" + encryptTestJdbcDao.getEncryptName());
		System.out.println("2:" + encryptTestJdbcDao.getEncryptNameNP());
		System.out.println("3:" + encryptTestJdbcDao.getAllEncrypts());
		System.out.println("4:" + encryptTestJdbcDao.getAllEncryptsNP());
		System.out.println("5:" + encryptTestJdbcDao.getEncrypt());
		System.out.println("6:" + encryptTestJdbcDao.getEncryptNP());
	}

}
