diff --git a/README.md b/README.md
index f46f7fa3ae476255430f7083f9e3351a0a09e667..ab11abbac3215f24ed4564cbbc11b8dacc849843 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# mybatis-enhance-actable-0.0.1
-该项目是从之前写过的一个框架中抽取出来的,本身是对Mybatis做的增强功能,为了能够使习惯了hibernate框架的开发者能够快速的入手Mybatis,我给他取名叫做 “A.C.Table” 本意是自动建表的意思,A.C.Table是一个基于Spring和Mybatis的Maven项目,增强了Mybatis的功能,过配置model注解的方式来创建表,修改表结构,目前仅支持Mysql,后续可能会扩展针对其他数据库的支持。
+该项目是从之前写过的一个框架中抽取出来的,本身是对Mybatis做的增强功能,为了能够使习惯了hibernate框架的开发者能够快速的入手Mybatis,我给他取名叫做 “A.C.Table” 本意是自动建表的意思,A.C.Table是一个基于Spring和Mybatis的Maven项目,增强了Mybatis的功能,过配置model注解的方式来创建表,修改表结构,并且实现了共通的CUDR功能提升开发效率,目前仅支持Mysql,后续可能会扩展针对其他数据库的支持。
A.C.Table是采用了Spring、Mybatis技术的Maven结构,详细介绍如下:
@@ -12,11 +12,21 @@ A.C.Table是采用了Spring、Mybatis技术的Maven结构,详细介绍如下
5. 再次声明A.C.Table目前仅支持mysql数据库
**使用步骤方法**
-1. 使用该功能的项目需要依赖mybatis-enhance-actable-0.0.1-SNAPSHOT.jar
+1. 使用该功能的项目需要依赖mybatis-enhance-actable-1.0.1.jar
+
+ 已上传至maven中央仓库,使用时pom文件中增加如下依赖
+
+ com.gitee.sunchenbin.mybatis.actable
+ mybatis-enhance-actable
+ 1.0.1
+
2. 在你的web项目上创建个目录比如config下面创建个文件autoCreateTable.properties文件的内容如下:
mybatis.table.auto=update
+
mybatis.model.pack=com.sunchenbin.store.model
+
+ mybatis.database.type=mysql
本系统提供三种模式:
@@ -26,11 +36,14 @@ A.C.Table是采用了Spring、Mybatis技术的Maven结构,详细介绍如下
2.3 当mybatis.table.auto=none时,系统不做任何处理。
- 2.4mybatis.model.pack这个配置是用来配置要扫描的用于创建表的对象的包名
+ 2.4 mybatis.model.pack这个配置是用来配置要扫描的用于创建表的对象的包名
+
+ 2.5 mybatis.database.type这个是用来区别数据库的,预计会支持这四种数据库mysql/oracle/sqlserver/postgresql,但目前仅支持mysql
3. spring的配置文件中需要做如下配置:
-
-
+```
+
+
@@ -45,8 +58,8 @@ A.C.Table是采用了Spring、Mybatis技术的Maven结构,详细介绍如下
- 1. classpath*:com/mybatis/enhance/store/mapping/*/*.xml
- 2. com.mybatis.enhance.store.dao.*
+ 1. classpath*:com/gitee/sunchenbin/mybatis/actable/mapping/*/*.xml
+ 2. com.gitee.sunchenbin.mybatis.actable.dao.*
举例这两个配置配置的详细位置
@@ -57,7 +70,7 @@ A.C.Table是采用了Spring、Mybatis技术的Maven结构,详细介绍如下
classpath*:com/sunchenbin/store/mapping/*/*.xml
- classpath*:com/mybatis/enhance/store/mapping/*/*.xml
+ classpath*:com/gitee/sunchenbin/mybatis/actable/mapping/*/*.xml
@@ -65,9 +78,10 @@ A.C.Table是采用了Spring、Mybatis技术的Maven结构,详细介绍如下
-
+
+```
**代码用途讲解**
@@ -81,12 +95,78 @@ A.C.Table是采用了Spring、Mybatis技术的Maven结构,详细介绍如下
5.系统启动后会去自动调用SysMysqlCreateTableManagerImpl.java的createMysqlTable()方法,没错,这就是核心方法了,负责创建、删除、修改表。
- **demo代码的地址**
-
- 1.码云地址:http://git.oschina.net/sunchenbin/mybatis-enhance-actable-demo
-
- 2.代码下载地址:https://git.oschina.net/sunchenbin/mybatis-enhance-actable-demo.git
+ **model的写法例子**
+```
+@Table(name = "test")
+public class Test extends BaseModel{
+
+ private static final long serialVersionUID = 5199200306752426433L;
+
+ @Column(name = "id",type = MySqlTypeConstant.INT,length = 11,isKey = true,isAutoIncrement = true)
+ private Integer id;
+
+ @Column(name = "name",type = MySqlTypeConstant.VARCHAR,length = 111)
+ private String name;
+
+ @Column(name = "description",type = MySqlTypeConstant.TEXT)
+ private String description;
+
+ @Column(name = "create_time",type = MySqlTypeConstant.DATETIME)
+ private Date create_time;
- **之前的旧项目地址**
+ @Column(name = "update_time",type = MySqlTypeConstant.DATETIME)
+ private Date update_time;
- http://git.oschina.net/sunchenbin/Mybatis_BuildTable_V0.2
+ @Column(name = "number",type = MySqlTypeConstant.BIGINT,length = 5,isUnique=true)
+ private Long number;
+
+ @Column(name = "lifecycle",type = MySqlTypeConstant.CHAR,length = 1,isNull=false)
+ private String lifecycle;
+
+ @Column(name = "dekes",type = MySqlTypeConstant.DOUBLE,length = 5,decimalLength = 2)
+ private Double dekes;
+
+ // get和set方法这里就不例举了太多
+}
+```
+ **共通的CUDR功能使用**
+
+ 1.使用方法很简单,大家在manager或者Controller中直接注入BaseMysqlCRUDManager这个接口就可以了
+
+ 2.注意:接口调用save、delete等方法时传入的对象必须是modle中用于创建表的对象
+代码事例:
+```
+@Controller
+public class TestController{
+
+ @Autowired
+ private TestManager testManager;
+
+ @Autowired
+ private BaseMysqlCRUDManager baseMysqlCRUDManager;
+
+ /**
+ * 首页
+ */
+ @RequestMapping("/testDate")
+ @ResponseBody
+ public String testDate(){
+ Test2 test2 = new Test2();
+ test2.setNumber(3L);
+ baseMysqlCRUDManager.save(test2);
+
+ Test test = new Test();
+ test.setName("aaae333");
+ test.setNumber(9L);
+ test.setDescription("adfsdfe");
+
+ baseMysqlCRUDManager.delete(test);
+ baseMysqlCRUDManager.save(test);
+ int count = testManager.findTestCount();
+ System.out.println(count);
+ List query = baseMysqlCRUDManager.query(test);
+ String json = JsonUtil.format(query);
+ return json;
+ }
+}
+```
diff --git a/mybatis-enhance-actable/.gitignore b/mybatis-enhance-actable/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..b83d22266ac8aa2f8df2edef68082c789727841d
--- /dev/null
+++ b/mybatis-enhance-actable/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/mybatis-enhance-actable/pom.xml b/mybatis-enhance-actable/pom.xml
index 10c33c01c83080a968a2fabf22ba58ef4f139bcd..8d44171da6bb4111843f6d7fd08b2ee2aab7c31d 100644
--- a/mybatis-enhance-actable/pom.xml
+++ b/mybatis-enhance-actable/pom.xml
@@ -1,57 +1,193 @@
-
- 4.0.0
- com.mybatis.enhance.store
- mybatis-enhance-actable
- 0.0.1-SNAPSHOT
-
-
- 4.1.4.RELEASE
-
-
-
-
-
-
- org.springframework
- spring-context
- ${spring.version}
- provided
-
-
-
- org.springframework
- spring-tx
- ${spring.version}
- provided
-
-
-
- org.slf4j
- slf4j-api
- 1.7.12
- provided
-
-
-
- org.mybatis.scripting
- mybatis-velocity
- 1.2
- provided
-
-
-
-
-
-
- src/main/java
-
- **/*.properties
- **/*.xml
-
- false
-
-
-
-
+
+
+ 4.0.0
+ com.gitee.sunchenbin.mybatis.actable
+ mybatis-enhance-actable
+ 1.0.1
+
+
+ org.sonatype.oss
+ oss-parent
+ 7
+
+
+ com.gitee.sunchenbin.mybatis.actable:mybatis-enhance-actable
+ A.CTable is a Maven project based on Spring and Mybatis, which enhances the function of Mybatis
+ https://gitee.com/sunchenbin/mybatis-enhance
+
+
+
+ The Apache Software License, Version 2.0
+ http://www.apache.org/licenses/LICENSE-2.0.txt
+ actable
+
+
+
+
+
+ sunchenbin
+ 458757617@qq.com
+ sunchenbin
+ https://gitee.com/sunchenbin/mybatis-enhance
+
+
+
+
+ scm:git:git@gitee.com:sunchenbin/mybatis-enhance.git
+ scm:git:git@gitee.com:sunchenbin/mybatis-enhance.git
+ https://gitee.com/sunchenbin/mybatis-enhance
+ 1.0
+
+
+
+ 4.1.4.RELEASE
+
+
+
+
+
+
+ org.springframework
+ spring-context
+ ${spring.version}
+ provided
+
+
+
+ org.springframework
+ spring-tx
+ ${spring.version}
+ provided
+
+
+
+ org.slf4j
+ slf4j-api
+ 1.7.12
+ provided
+
+
+
+ org.mybatis.scripting
+ mybatis-velocity
+ 1.2
+ provided
+
+
+
+
+
+
+
+ src/main/java
+
+ **/*.properties
+ **/*.xml
+
+ false
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 2.2.1
+
+
+ attach-sources
+ package
+
+ jar-no-fork
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.9.1
+
+ UTF-8
+ UTF-8
+
+
+
+ attach-javadocs
+ package
+
+ jar
+
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.0
+
+ 1.6
+ 1.6
+ true
+ true
+ UTF-8
+ true
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+
+ /usr/local/lib
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-release-plugin
+ 2.5.1
+
+
+
+
+
+
+
+ oss
+ OSS Snapshots Repository
+
+ https://oss.sonatype.org/content/repositories/snapshots/
+
+
+ oss
+ OSS Staging Repository
+
+ https://oss.sonatype.org/service/local/staging/deploy/maven2/
+
+
+
+
\ No newline at end of file
diff --git a/mybatis-enhance-actable/src/main/java/com/mybatis/enhance/store/annotation/Column.java b/mybatis-enhance-actable/src/main/java/com/gitee/sunchenbin/mybatis/actable/annotation/Column.java
similarity index 75%
rename from mybatis-enhance-actable/src/main/java/com/mybatis/enhance/store/annotation/Column.java
rename to mybatis-enhance-actable/src/main/java/com/gitee/sunchenbin/mybatis/actable/annotation/Column.java
index 99856b2d8ca35bd67e7ca0f7b0f39e2a287c6c2b..7a2686557fdb48ea8f26a7bccff3310f0029ba0e 100644
--- a/mybatis-enhance-actable/src/main/java/com/mybatis/enhance/store/annotation/Column.java
+++ b/mybatis-enhance-actable/src/main/java/com/gitee/sunchenbin/mybatis/actable/annotation/Column.java
@@ -1,4 +1,4 @@
-package com.mybatis.enhance.store.annotation;
+package com.gitee.sunchenbin.mybatis.actable.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
@@ -26,63 +26,63 @@ public @interface Column{
/**
* 字段名
*
- * @return
+ * @return 字段名
*/
public String name();
/**
* 字段类型
*
- * @return
+ * @return 字段类型
*/
public String type();
/**
* 字段长度,默认是255
*
- * @return
+ * @return 字段长度,默认是255
*/
public int length() default 255;
/**
* 小数点长度,默认是0
*
- * @return
+ * @return 小数点长度,默认是0
*/
public int decimalLength() default 0;
/**
* 是否为可以为null,true是可以,false是不可以,默认为true
*
- * @return
+ * @return 是否为可以为null,true是可以,false是不可以,默认为true
*/
public boolean isNull() default true;
/**
* 是否是主键,默认false
*
- * @return
+ * @return 是否是主键,默认false
*/
public boolean isKey() default false;
/**
* 是否自动递增,默认false 只有主键才能使用
*
- * @return
+ * @return 是否自动递增,默认false 只有主键才能使用
*/
public boolean isAutoIncrement() default false;
/**
* 默认值,默认为null
*
- * @return
+ * @return 默认值,默认为null
*/
public String defaultValue() default "NULL";
/**
* 是否是唯一,默认false
*
- * @return
+ * @return 是否是唯一,默认false
*/
public boolean isUnique() default false;
}
diff --git a/mybatis-enhance-actable/src/main/java/com/mybatis/enhance/store/annotation/LengthCount.java b/mybatis-enhance-actable/src/main/java/com/gitee/sunchenbin/mybatis/actable/annotation/LengthCount.java
similarity index 86%
rename from mybatis-enhance-actable/src/main/java/com/mybatis/enhance/store/annotation/LengthCount.java
rename to mybatis-enhance-actable/src/main/java/com/gitee/sunchenbin/mybatis/actable/annotation/LengthCount.java
index 93c0e4fb11aabb8bfc5ca2acdf5f481075b30a21..2157ebdf9bbb956abfdd74d88dfa705516690e69 100644
--- a/mybatis-enhance-actable/src/main/java/com/mybatis/enhance/store/annotation/LengthCount.java
+++ b/mybatis-enhance-actable/src/main/java/com/gitee/sunchenbin/mybatis/actable/annotation/LengthCount.java
@@ -1,4 +1,4 @@
-package com.mybatis.enhance.store.annotation;
+package com.gitee.sunchenbin.mybatis.actable.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
@@ -27,7 +27,7 @@ public @interface LengthCount{
/**
* 默认是1,0表示不需要设置,1表示需要设置一个,2表示需要设置两个
*
- * @return
+ * @return 默认是1,0表示不需要设置,1表示需要设置一个,2表示需要设置两个
*/
public int LengthCount() default 1;
}
diff --git a/mybatis-enhance-actable/src/main/java/com/mybatis/enhance/store/annotation/Table.java b/mybatis-enhance-actable/src/main/java/com/gitee/sunchenbin/mybatis/actable/annotation/Table.java
similarity index 90%
rename from mybatis-enhance-actable/src/main/java/com/mybatis/enhance/store/annotation/Table.java
rename to mybatis-enhance-actable/src/main/java/com/gitee/sunchenbin/mybatis/actable/annotation/Table.java
index b2885030130720261851d21c901847c2c7c1682c..2a62b754b24d78d4743bfeeb4770dc3175aa9e1f 100644
--- a/mybatis-enhance-actable/src/main/java/com/mybatis/enhance/store/annotation/Table.java
+++ b/mybatis-enhance-actable/src/main/java/com/gitee/sunchenbin/mybatis/actable/annotation/Table.java
@@ -1,4 +1,4 @@
-package com.mybatis.enhance.store.annotation;
+package com.gitee.sunchenbin.mybatis.actable.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
@@ -26,7 +26,7 @@ public @interface Table {
/**
* 表名
- * @return
+ * @return 表名
*/
public String name();
}
diff --git a/mybatis-enhance-actable/src/main/java/com/mybatis/enhance/store/command/BaseModel.java b/mybatis-enhance-actable/src/main/java/com/gitee/sunchenbin/mybatis/actable/command/BaseModel.java
similarity index 94%
rename from mybatis-enhance-actable/src/main/java/com/mybatis/enhance/store/command/BaseModel.java
rename to mybatis-enhance-actable/src/main/java/com/gitee/sunchenbin/mybatis/actable/command/BaseModel.java
index efe8cf9d4e28d028f631f04b533acfa01831d66e..b598a9ffd18a7537c097cc3e9d5fe2875bc1a45d 100644
--- a/mybatis-enhance-actable/src/main/java/com/mybatis/enhance/store/command/BaseModel.java
+++ b/mybatis-enhance-actable/src/main/java/com/gitee/sunchenbin/mybatis/actable/command/BaseModel.java
@@ -1,4 +1,4 @@
-package com.mybatis.enhance.store.command;
+package com.gitee.sunchenbin.mybatis.actable.command;
import java.io.Serializable;
diff --git a/mybatis-enhance-actable/src/main/java/com/mybatis/enhance/store/command/CreateTableParam.java b/mybatis-enhance-actable/src/main/java/com/gitee/sunchenbin/mybatis/actable/command/CreateTableParam.java
similarity index 97%
rename from mybatis-enhance-actable/src/main/java/com/mybatis/enhance/store/command/CreateTableParam.java
rename to mybatis-enhance-actable/src/main/java/com/gitee/sunchenbin/mybatis/actable/command/CreateTableParam.java
index ea52bbd8d4b1b370bab3ab669c6173fdee4a3cdc..f3c370482c4c93f757d6a2be5fcd9f08bdefee41 100644
--- a/mybatis-enhance-actable/src/main/java/com/mybatis/enhance/store/command/CreateTableParam.java
+++ b/mybatis-enhance-actable/src/main/java/com/gitee/sunchenbin/mybatis/actable/command/CreateTableParam.java
@@ -1,4 +1,4 @@
-package com.mybatis.enhance.store.command;
+package com.gitee.sunchenbin.mybatis.actable.command;
/**
* 用于存放创建表的字段信息
diff --git a/mybatis-enhance-actable/src/main/java/com/mybatis/enhance/store/command/SysMysqlColumns.java b/mybatis-enhance-actable/src/main/java/com/gitee/sunchenbin/mybatis/actable/command/SysMysqlColumns.java
similarity index 85%
rename from mybatis-enhance-actable/src/main/java/com/mybatis/enhance/store/command/SysMysqlColumns.java
rename to mybatis-enhance-actable/src/main/java/com/gitee/sunchenbin/mybatis/actable/command/SysMysqlColumns.java
index e935cf12f5511714c807e44055f5fcaf5d0c6a07..a494492a2c023a8ac68a8572408410d02c18cb5a 100644
--- a/mybatis-enhance-actable/src/main/java/com/mybatis/enhance/store/command/SysMysqlColumns.java
+++ b/mybatis-enhance-actable/src/main/java/com/gitee/sunchenbin/mybatis/actable/command/SysMysqlColumns.java
@@ -1,252 +1,252 @@
-package com.mybatis.enhance.store.command;
-
-/**
- * 用于查询表中字段结构详细信息
- *
- * @author sunchenbin
- * @version 2016年6月23日 下午6:10:56
- */
-public class SysMysqlColumns {
-
- /**
- * 字段名
- */
- public static final String COLUMN_NAME = "column_name";
- /**
- * 默认值
- */
- public static final String COLUMN_DEFAULT = "column_default";
- /**
- * 是否可为null,值:(YES,NO)
- */
- public static final String IS_NULLABLE = "is_nullable";
- /**
- * 数据类型
- */
- public static final String DATA_TYPE = "data_type";
- /**
- * 长度,如果是0的话是null
- */
- public static final String NUMERIC_PRECISION = "numeric_precision";
- /**
- * 小数点数
- */
- public static final String NUMERIC_SCALE = "numeric_scale";
- /**
- * 是否为主键,是的话是PRI
- */
- public static final String COLUMN_KEY = "column_key";
- /**
- * 是否为自动增长,是的话为auto_increment
- */
- public static final String EXTRA = "extra";
-
- private String table_catalog;
- /**
- * 库名
- */
- private String table_schema;
- /**
- * 表名
- */
- private String table_name;
- /**
- * 字段名
- */
- private String column_name;
- /**
- * 字段位置的排序
- */
- private String ordinal_position;
- /**
- * 字段默认值
- */
- private String column_default;
- /**
- * 是否可以为null
- */
- private String is_nullable;
- /**
- * 字段类型
- */
- private String data_type;
- private String character_maximum_length;
- private String character_octet_length;
- /**
- * 长度
- */
- private String numeric_precision;
- /**
- * 小数点数
- */
- private String numeric_scale;
- private String character_set_name;
- private String collation_name;
- /**
- * 类型加长度拼接的字符串,例如varchar(100)
- */
- private String column_type;
- /**
- * 主键:PRI;唯一键:UNI
- */
- private String column_key;
- /**
- * 是否为自动增长,是的话为auto_increment
- */
- private String extra;
- private String privileges;
- private String column_comment;
-
- public String getTable_catalog() {
- return table_catalog;
- }
-
- public void setTable_catalog(String table_catalog) {
- this.table_catalog = table_catalog;
- }
-
- public String getTable_schema() {
- return table_schema;
- }
-
- public void setTable_schema(String table_schema) {
- this.table_schema = table_schema;
- }
-
- public String getTable_name() {
- return table_name;
- }
-
- public void setTable_name(String table_name) {
- this.table_name = table_name;
- }
-
- public String getColumn_name() {
- return column_name;
- }
-
- public void setColumn_name(String column_name) {
- this.column_name = column_name;
- }
-
- public String getOrdinal_position() {
- return ordinal_position;
- }
-
- public void setOrdinal_position(String ordinal_position) {
- this.ordinal_position = ordinal_position;
- }
-
- public String getColumn_default() {
- return column_default;
- }
-
- public void setColumn_default(String column_default) {
- this.column_default = column_default;
- }
-
- public String getIs_nullable() {
- return is_nullable;
- }
-
- public void setIs_nullable(String is_nullable) {
- this.is_nullable = is_nullable;
- }
-
- public String getData_type() {
- return data_type;
- }
-
- public void setData_type(String data_type) {
- this.data_type = data_type;
- }
-
- public String getCharacter_maximum_length() {
- return character_maximum_length;
- }
-
- public void setCharacter_maximum_length(String character_maximum_length) {
- this.character_maximum_length = character_maximum_length;
- }
-
- public String getCharacter_octet_length() {
- return character_octet_length;
- }
-
- public void setCharacter_octet_length(String character_octet_length) {
- this.character_octet_length = character_octet_length;
- }
-
- public String getNumeric_precision() {
- return numeric_precision;
- }
-
- public void setNumeric_precision(String numeric_precision) {
- this.numeric_precision = numeric_precision;
- }
-
- public String getNumeric_scale() {
- return numeric_scale;
- }
-
- public void setNumeric_scale(String numeric_scale) {
- this.numeric_scale = numeric_scale;
- }
-
- public String getCharacter_set_name() {
- return character_set_name;
- }
-
- public void setCharacter_set_name(String character_set_name) {
- this.character_set_name = character_set_name;
- }
-
- public String getCollation_name() {
- return collation_name;
- }
-
- public void setCollation_name(String collation_name) {
- this.collation_name = collation_name;
- }
-
- public String getColumn_type() {
- return column_type;
- }
-
- public void setColumn_type(String column_type) {
- this.column_type = column_type;
- }
-
- public String getColumn_key() {
- return column_key;
- }
-
- public void setColumn_key(String column_key) {
- this.column_key = column_key;
- }
-
- public String getExtra() {
- return extra;
- }
-
- public void setExtra(String extra) {
- this.extra = extra;
- }
-
- public String getPrivileges() {
- return privileges;
- }
-
- public void setPrivileges(String privileges) {
- this.privileges = privileges;
- }
-
- public String getColumn_comment() {
- return column_comment;
- }
-
- public void setColumn_comment(String column_comment) {
- this.column_comment = column_comment;
- }
-
-}
+package com.gitee.sunchenbin.mybatis.actable.command;
+
+/**
+ * 用于查询表中字段结构详细信息
+ *
+ * @author sunchenbin
+ * @version 2016年6月23日 下午6:10:56
+ */
+public class SysMysqlColumns {
+
+ /**
+ * 字段名
+ */
+ public static final String COLUMN_NAME_KEY = "column_name";
+ /**
+ * 默认值
+ */
+ public static final String COLUMN_DEFAULT_KEY = "column_default";
+ /**
+ * 是否可为null,值:(YES,NO)
+ */
+ public static final String IS_NULLABLE_KEY = "is_nullable";
+ /**
+ * 数据类型
+ */
+ public static final String DATA_TYPE_KEY = "data_type";
+ /**
+ * 长度,如果是0的话是null
+ */
+ public static final String NUMERIC_PRECISION_KEY = "numeric_precision";
+ /**
+ * 小数点数
+ */
+ public static final String NUMERIC_SCALE_KEY = "numeric_scale";
+ /**
+ * 是否为主键,是的话是PRI
+ */
+ public static final String COLUMN_KEY_KEY = "column_key";
+ /**
+ * 是否为自动增长,是的话为auto_increment
+ */
+ public static final String EXTRA_KEY = "extra";
+
+ private String table_catalog;
+ /**
+ * 库名
+ */
+ private String table_schema;
+ /**
+ * 表名
+ */
+ private String table_name;
+ /**
+ * 字段名
+ */
+ private String column_name;
+ /**
+ * 字段位置的排序
+ */
+ private String ordinal_position;
+ /**
+ * 字段默认值
+ */
+ private String column_default;
+ /**
+ * 是否可以为null
+ */
+ private String is_nullable;
+ /**
+ * 字段类型
+ */
+ private String data_type;
+ private String character_maximum_length;
+ private String character_octet_length;
+ /**
+ * 长度
+ */
+ private String numeric_precision;
+ /**
+ * 小数点数
+ */
+ private String numeric_scale;
+ private String character_set_name;
+ private String collation_name;
+ /**
+ * 类型加长度拼接的字符串,例如varchar(100)
+ */
+ private String column_type;
+ /**
+ * 主键:PRI;唯一键:UNI
+ */
+ private String column_key;
+ /**
+ * 是否为自动增长,是的话为auto_increment
+ */
+ private String extra;
+ private String privileges;
+ private String column_comment;
+
+ public String getTable_catalog() {
+ return table_catalog;
+ }
+
+ public void setTable_catalog(String table_catalog) {
+ this.table_catalog = table_catalog;
+ }
+
+ public String getTable_schema() {
+ return table_schema;
+ }
+
+ public void setTable_schema(String table_schema) {
+ this.table_schema = table_schema;
+ }
+
+ public String getTable_name() {
+ return table_name;
+ }
+
+ public void setTable_name(String table_name) {
+ this.table_name = table_name;
+ }
+
+ public String getColumn_name() {
+ return column_name;
+ }
+
+ public void setColumn_name(String column_name) {
+ this.column_name = column_name;
+ }
+
+ public String getOrdinal_position() {
+ return ordinal_position;
+ }
+
+ public void setOrdinal_position(String ordinal_position) {
+ this.ordinal_position = ordinal_position;
+ }
+
+ public String getColumn_default() {
+ return column_default;
+ }
+
+ public void setColumn_default(String column_default) {
+ this.column_default = column_default;
+ }
+
+ public String getIs_nullable() {
+ return is_nullable;
+ }
+
+ public void setIs_nullable(String is_nullable) {
+ this.is_nullable = is_nullable;
+ }
+
+ public String getData_type() {
+ return data_type;
+ }
+
+ public void setData_type(String data_type) {
+ this.data_type = data_type;
+ }
+
+ public String getCharacter_maximum_length() {
+ return character_maximum_length;
+ }
+
+ public void setCharacter_maximum_length(String character_maximum_length) {
+ this.character_maximum_length = character_maximum_length;
+ }
+
+ public String getCharacter_octet_length() {
+ return character_octet_length;
+ }
+
+ public void setCharacter_octet_length(String character_octet_length) {
+ this.character_octet_length = character_octet_length;
+ }
+
+ public String getNumeric_precision() {
+ return numeric_precision;
+ }
+
+ public void setNumeric_precision(String numeric_precision) {
+ this.numeric_precision = numeric_precision;
+ }
+
+ public String getNumeric_scale() {
+ return numeric_scale;
+ }
+
+ public void setNumeric_scale(String numeric_scale) {
+ this.numeric_scale = numeric_scale;
+ }
+
+ public String getCharacter_set_name() {
+ return character_set_name;
+ }
+
+ public void setCharacter_set_name(String character_set_name) {
+ this.character_set_name = character_set_name;
+ }
+
+ public String getCollation_name() {
+ return collation_name;
+ }
+
+ public void setCollation_name(String collation_name) {
+ this.collation_name = collation_name;
+ }
+
+ public String getColumn_type() {
+ return column_type;
+ }
+
+ public void setColumn_type(String column_type) {
+ this.column_type = column_type;
+ }
+
+ public String getColumn_key() {
+ return column_key;
+ }
+
+ public void setColumn_key(String column_key) {
+ this.column_key = column_key;
+ }
+
+ public String getExtra() {
+ return extra;
+ }
+
+ public void setExtra(String extra) {
+ this.extra = extra;
+ }
+
+ public String getPrivileges() {
+ return privileges;
+ }
+
+ public void setPrivileges(String privileges) {
+ this.privileges = privileges;
+ }
+
+ public String getColumn_comment() {
+ return column_comment;
+ }
+
+ public void setColumn_comment(String column_comment) {
+ this.column_comment = column_comment;
+ }
+
+}
diff --git a/mybatis-enhance-actable/src/main/java/com/mybatis/enhance/store/constants/MySqlTypeConstant.java b/mybatis-enhance-actable/src/main/java/com/gitee/sunchenbin/mybatis/actable/constants/MySqlTypeConstant.java
similarity index 88%
rename from mybatis-enhance-actable/src/main/java/com/mybatis/enhance/store/constants/MySqlTypeConstant.java
rename to mybatis-enhance-actable/src/main/java/com/gitee/sunchenbin/mybatis/actable/constants/MySqlTypeConstant.java
index 8aa1d6fa70388c763a0b3899ed5cb7f8b8ae9cad..10c14d8d26f5346c0f36a8c7bc0f7da1e88753f5 100644
--- a/mybatis-enhance-actable/src/main/java/com/mybatis/enhance/store/constants/MySqlTypeConstant.java
+++ b/mybatis-enhance-actable/src/main/java/com/gitee/sunchenbin/mybatis/actable/constants/MySqlTypeConstant.java
@@ -1,6 +1,6 @@
-package com.mybatis.enhance.store.constants;
+package com.gitee.sunchenbin.mybatis.actable.constants;
-import com.mybatis.enhance.store.annotation.LengthCount;
+import com.gitee.sunchenbin.mybatis.actable.annotation.LengthCount;
/**
diff --git a/mybatis-enhance-actable/src/main/java/com/gitee/sunchenbin/mybatis/actable/constants/OracleTypeConstant.java b/mybatis-enhance-actable/src/main/java/com/gitee/sunchenbin/mybatis/actable/constants/OracleTypeConstant.java
new file mode 100644
index 0000000000000000000000000000000000000000..33a7f7311e020dab562489e89d1f1fe7f7676034
--- /dev/null
+++ b/mybatis-enhance-actable/src/main/java/com/gitee/sunchenbin/mybatis/actable/constants/OracleTypeConstant.java
@@ -0,0 +1,32 @@
+package com.gitee.sunchenbin.mybatis.actable.constants;
+
+import com.gitee.sunchenbin.mybatis.actable.annotation.LengthCount;
+
+
+/**
+ * 用于配置Oracle数据库中类型,并且该类型需要设置几个长度
+ * 这里配置多少个类型决定了,创建表能使用多少类型
+ * 例如:varchar2(1)
+ * number(5,2)
+ * date
+ *
+ * @author sunchenbin
+ * @version 2016年6月23日 下午5:59:33
+ */
+public class OracleTypeConstant {
+
+ @LengthCount(LengthCount=2)
+ public static final String NUMBER = "number";
+
+ @LengthCount
+ public static final String VARCHAR2 = "varchar2";
+
+ @LengthCount(LengthCount=0)
+ public static final String CLOB = "clob";
+
+ @LengthCount(LengthCount=0)
+ public static final String DATE = "date";
+
+ @LengthCount
+ public static final String CHAR = "char";
+}
diff --git a/mybatis-enhance-actable/src/main/java/com/mybatis/enhance/store/dao/common/BaseMysqlCRUDMapper.java b/mybatis-enhance-actable/src/main/java/com/gitee/sunchenbin/mybatis/actable/dao/common/BaseMysqlCRUDMapper.java
similarity index 76%
rename from mybatis-enhance-actable/src/main/java/com/mybatis/enhance/store/dao/common/BaseMysqlCRUDMapper.java
rename to mybatis-enhance-actable/src/main/java/com/gitee/sunchenbin/mybatis/actable/dao/common/BaseMysqlCRUDMapper.java
index a42e0fb180ed8869337a661bb886fc5ad878638b..48e24663a8fa89d4b9ea5fba3c56406613f76e6e 100644
--- a/mybatis-enhance-actable/src/main/java/com/mybatis/enhance/store/dao/common/BaseMysqlCRUDMapper.java
+++ b/mybatis-enhance-actable/src/main/java/com/gitee/sunchenbin/mybatis/actable/dao/common/BaseMysqlCRUDMapper.java
@@ -1,4 +1,4 @@
-package com.mybatis.enhance.store.dao.common;
+package com.gitee.sunchenbin.mybatis.actable.dao.common;
import java.util.List;
import java.util.Map;
@@ -15,26 +15,25 @@ public interface BaseMysqlCRUDMapper {
/**
* 保存
- * @param tableMap
+ * @param tableMap 表结构的map
*/
public void save(@Param("tableMap") Map