From 6192d425642f1205f650e16157dbef2a15007978 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期日, 30 五月 2021 02:18:34 +0800
Subject: [PATCH] update 优化代码生成模板

---
 ruoyi-generator/src/main/resources/vm/java/domain.java.vm  |    7 +++++--
 ruoyi-generator/src/main/resources/vm/java/service.java.vm |    1 +
 ruoyi-generator/src/main/resources/vm/java/vo.java.vm      |    4 +++-
 ruoyi-generator/src/main/resources/vm/java/addBo.java.vm   |    1 +
 4 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/ruoyi-generator/src/main/resources/vm/java/addBo.java.vm b/ruoyi-generator/src/main/resources/vm/java/addBo.java.vm
index 98a1497..e010d20 100644
--- a/ruoyi-generator/src/main/resources/vm/java/addBo.java.vm
+++ b/ruoyi-generator/src/main/resources/vm/java/addBo.java.vm
@@ -24,6 +24,7 @@
 
 #foreach ($column in $columns)
 #if($column.isInsert && $column.isPk!=1)
+
     /** $column.columnComment */
     @ApiModelProperty("$column.columnComment")
 #if($column.javaType == 'Date')
diff --git a/ruoyi-generator/src/main/resources/vm/java/domain.java.vm b/ruoyi-generator/src/main/resources/vm/java/domain.java.vm
index b06144c..b6eca82 100644
--- a/ruoyi-generator/src/main/resources/vm/java/domain.java.vm
+++ b/ruoyi-generator/src/main/resources/vm/java/domain.java.vm
@@ -11,7 +11,7 @@
 
 /**
  * ${functionName}瀵硅薄 ${tableName}
- * 
+ *
  * @author ${author}
  * @date ${datetime}
  */
@@ -21,7 +21,7 @@
 @TableName("${tableName}")
 public class ${ClassName} implements Serializable {
 
-private static final long serialVersionUID=1L;
+    private static final long serialVersionUID=1L;
 
 #foreach ($column in $columns)
 
@@ -35,6 +35,9 @@
 #if($column.javaField=='delFlag')
     @TableLogic
 #end
+#if($column.javaField=='version')
+    @Version
+#end
 #if($column.isPk==1)
     @TableId(value = "$column.columnName")
 #end
diff --git a/ruoyi-generator/src/main/resources/vm/java/service.java.vm b/ruoyi-generator/src/main/resources/vm/java/service.java.vm
index 0561660..d5016d4 100644
--- a/ruoyi-generator/src/main/resources/vm/java/service.java.vm
+++ b/ruoyi-generator/src/main/resources/vm/java/service.java.vm
@@ -32,6 +32,7 @@
 	 */
     TableDataInfo<${ClassName}Vo> queryPageList(${ClassName}QueryBo bo);
 #end
+
 	/**
 	 * 鏌ヨ鍒楄〃
 	 */
diff --git a/ruoyi-generator/src/main/resources/vm/java/vo.java.vm b/ruoyi-generator/src/main/resources/vm/java/vo.java.vm
index 0746f0c..87f7209 100644
--- a/ruoyi-generator/src/main/resources/vm/java/vo.java.vm
+++ b/ruoyi-generator/src/main/resources/vm/java/vo.java.vm
@@ -13,7 +13,7 @@
 
 
 /**
- * ${functionName}瑙嗗浘瀵硅薄 mall_package
+ * ${functionName}瑙嗗浘瀵硅薄 ${tableName}
  *
  * @author ${author}
  * @date ${datetime}
@@ -21,6 +21,7 @@
 @Data
 @ApiModel("${functionName}瑙嗗浘瀵硅薄")
 public class ${ClassName}Vo {
+
 	private static final long serialVersionUID = 1L;
 
 	/** $pkColumn.columnComment */
@@ -46,6 +47,7 @@
 #end
 	@ApiModelProperty("$column.columnComment")
 	private $column.javaType $column.javaField;
+
 #end
 #end
 

--
Gitblit v1.9.3