package com.tofly.common.oauth.config;

import org.apache.ibatis.reflection.MetaObject;
import org.apache.ibatis.reflection.wrapper.MapWrapper;

import java.util.Map;

import static com.tofly.common.core.util.StringUtil.underlineToCamel;

/**
 * @author Administrator
 * @date 2019/10/28  14:51
 * 自定义处理map。
 */
public class MapKeyLowerWrapper extends MapWrapper {
    public MapKeyLowerWrapper(MetaObject metaObject, Map<String, Object> map) {
        super(metaObject, map);
    }

    @Override
    public String findProperty(String name, boolean useCamelCaseMapping) {

        //改为驼峰形式
        return underlineToCamel(name);
    }
}
