package com.saye.hospitalgd.config.dataSourceConfig;

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

import java.util.Map;

/**
 * @author thuang
 * @version 1.0
 * @description: 用来将查询结果的key全转为大写
 * @date 2021/5/8 10:05
 */
public class MapKeyUpperWrapper extends MapWrapper {

    public MapKeyUpperWrapper(MetaObject metaObject, Map<String, Object> map) {
        super(metaObject, map);
    }
    @Override
    public String findProperty(String name, boolean useCamelCaseMapping) {
        return name==null?"":name.toUpperCase() ;
    }
}