Coder Social home page Coder Social logo

wanglei2659297 / hui-mybatis-generator-plugins Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ken-hu/hui-mybatis-generator-plugins

0.0 0.0 0.0 46 KB

【Mybatis-Plugin】Mybatis-Generator的插件开发。根据个人需要

License: Apache License 2.0

Java 100.00%

hui-mybatis-generator-plugins's Introduction

hui-mybatis-plugins

【Mybatis-Plugin】Mybatis-Generator插件开发。根据个人需要

blog

  1. mybatis-generator-plugins-javaBean/xmlMethod生成工具
  2. mybatis-generator-plugins-postgresql-批量更新
  3. mybatis-generator-plugins-oracle-批量更新
  4. mybatis-generator-plugins-mysql批量更新
  5. mybatis-generator-plugins-postgresql-返回主键
  6. mybatis-generator-plugins-oracle-返回主键
  7. mybatis-generator-plugins-oracle-批量插入
  8. mybatis-generator-plugins-mysql/postgresql-批量插入
  9. mybatis-generator-plugin-批量删除

使用说明

需要新增批量操作的时候。有一个简易版插件。

  1. 在id上指定database
  2. targetRuntime指定Mybatis3
  3. 引入插件
  4. 判断是否自增,不加这个配置则是自己插入主键(适用于分布式系统)
    <context id="Mysql" targetRuntime="MyBatis3" >
           <!--批量操作-->
           <plugin type="com.hui.mybatis.plugins.BaseBatchOperatorPlugin"/>
         <generatedKey column="order_id" sqlStatement="JDBC" identity="id" />

批量新增

  1. MYSQL:
    com.hui.mybatis.plugins.BatchInsertPlugin
  2. ORACLE:
    com.hui.mybatis.plugins.OracleBatchInsertPlugin
  3. POSTGRESQL:
    com.hui.mybatis.plugins.BatchInsertPlugin

批量删除

  1. MYSQL:
    com.hui.mybatis.plugins.BatchDeletePlugin
  2. ORACLE:
    com.hui.mybatis.plugins.BatchDeletePlugin
  3. POSTGRESQL:
    com.hui.mybatis.plugins.BatchDeletePlugin

批量更新

  1. MYSQL:
    com.hui.mybatis.plugins.MysqlBatchUpdatePlugin
  2. ORACLE:
    com.hui.mybatis.plugins.OracleBatchUpdatePlugin
  3. POSTGRESQL:
    com.hui.mybatis.plugins.PostgreBatchUpdatePlugin

返回PG主键

com.hui.mybatis.plugins.PostGreSQLReturnKeyPlugin

返回ORACLE主键

com.hui.mybatis.plugins.OracleReturnKeyPlugin

重新生成的时候 覆盖原文件

com.hui.mybatis.plugins.OverWriteXmlPlugin

hui-mybatis-generator-plugins's People

Contributors

ken-hu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.