Pārlūkot izejas kodu

fix (model): 支持json数据结构2

1538940682@qq.com 3 gadi atpakaļ
vecāks
revīzija
6e7a56d4b8

+ 3 - 3
src/main/resources/generator.properties

@@ -8,8 +8,8 @@ author=
 #Email
 email=
 #\u8868\u524D\u7F00(\u7C7B\u540D\u4E0D\u4F1A\u5305\u542B\u8868\u524D\u7F00)
-tablePrefix=t_main_
-moduleName=main
+tablePrefix=t_wms_
+moduleName=wms
 
 #\u7C7B\u578B\u8F6C\u6362\uFF0C\u914D\u7F6E\u4FE1\u606F
 tinyint=Integer
@@ -29,7 +29,7 @@ tinytext=String
 text=String
 mediumtext=String
 longtext=String
-
+json=JSONObject
 
 date=LocalDateTime
 datetime=LocalDateTime

+ 2 - 2
src/main/resources/template/Entity.java.vm

@@ -37,9 +37,9 @@ public class ${className}Entity extends BaseEntity implements Serializable {
     /**
 	 * $column.comments
 	 */
-#if($column.attrType == "Json")
+#if($column.attrType == "JSONObject")
     @TableField(typeHandler = FastjsonTypeHandler.class)
-	private JSONObject $column.attrname;
+	private $column.attrType $column.attrname;
 #else
 	private $column.attrType $column.attrname;
 #end

+ 1 - 1
src/main/resources/template/VO.java.vm

@@ -36,7 +36,7 @@ public class ${className}VO extends BaseVO implements Serializable {
      * $column.comments
      */
 	@ApiModelProperty(value = "$column.comments")
-#if($column.attrType == "Json")
+#if($column.attrType == "JSONObject")
 	private JSONObject $column.attrname;
 #else
 	private $column.attrType $column.attrname;