package com.elab.redis.utils;

import org.apache.commons.beanutils.BeanUtils;
import org.junit.Test;

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

/**
 * 普通非容器测试
 *
 * @author ： liukx
 * @time ： 2020/7/10 - 15:02
 */
public class TestUtils {

    @Test
    public void testHashCode() {
        String json = " \t转换后的sql -\n" +
                "select\n" +
                "COUNT(DISTINCT created) as days\n" +
                "from\n" +
                "t_zhidi_activity_info\n" +
                "where brand_id = ? and house_id = ? and activity_id = ?\n" +
                "and activity_type\n" +
                "= ? and recommend_customer_id = ? and `status` = 1\n" +
                "and created >= ? and created <= ?1";
        String a = "Aa";
        String b = "BB";
        int aa = a.hashCode();
        int bb = b.hashCode();

        System.out.println(aa + "\t" + bb);
        System.out.println(json.hashCode());
    }

    @Test
    public void testPropertity() throws Exception {
        Map<String, String> map = new HashMap<>();
        map.put("a", "b");

        String data = "c";

        String abc = BeanUtils.getProperty(data, "abc");
        System.out.println(abc);

    }
}
