mybatis TkMapper插件

基础代码

/**
 * Mapper               - 通用的基础的方法
 * ConditionMapper      - Condition 的个性化命名方法
 * MySqlMapper          - MySql独有的通用方法
 * UpdateByDifferMapper - 根据 old 和 newer 进行差异更新,当对应某个字段值不同时才会更新
 * IdListMapper         - 根据idList操作 包含根据批量id查询、根据批量id删除
 */

public interface TkMapper<T> extends Mapper<T>, ConditionMapper<T>, MySqlMapper<T>, UpdateByDifferMapper<T>, IdListMapper<T, Integer>{

}

依赖

        <dependency>
            <groupId>tk.mybatis</groupId>
            <artifactId>mapper-spring-boot-starter</artifactId>
        </dependency>

猜你喜欢

转载自blog.csdn.net/m0_37601022/article/details/93487654