All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.baomidou.mybatisplus.extension.handlers.MybatisMapWrapper Maven / Gradle / Ivy

There is a newer version: 3.5.7
Show newest version
package com.baomidou.mybatisplus.extension.handlers;

import java.util.Map;

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

import com.baomidou.mybatisplus.core.toolkit.StringPool;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;

/**
 * 

* 返回Map结果集,下划线转驼峰 *

* * @author yuxiaobin * @since 2017/12/19 */ public class MybatisMapWrapper extends MapWrapper { public MybatisMapWrapper(MetaObject metaObject, Map map) { super(metaObject, map); } @Override public String findProperty(String name, boolean useCamelCaseMapping) { if (useCamelCaseMapping && ((name.charAt(0) >= 'A' && name.charAt(0) <= 'Z') || name.contains(StringPool.UNDERSCORE))) { return StringUtils.underlineToCamel(name); } return name; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy