From da1432df263aa1aa4390f54b2635bb70e7f5207b Mon Sep 17 00:00:00 2001
From: ‘liusuyi’ <1951119284@qq.com>
Date: 星期二, 22 八月 2023 11:24:16 +0800
Subject: [PATCH] 优化实体
---
ruoyi-generator/src/main/resources/vm/java/serviceImpl.java.vm | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/ruoyi-generator/src/main/resources/vm/java/serviceImpl.java.vm b/ruoyi-generator/src/main/resources/vm/java/serviceImpl.java.vm
index 894a508..9e7b90a 100644
--- a/ruoyi-generator/src/main/resources/vm/java/serviceImpl.java.vm
+++ b/ruoyi-generator/src/main/resources/vm/java/serviceImpl.java.vm
@@ -8,6 +8,7 @@
#end
#end
+import com.ruoyi.common.utils.uuid.IdUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
#if($table.sub)
@@ -67,6 +68,9 @@
@Override
public int insert${ClassName}(${ClassName} ${className}) {
#foreach ($column in $columns)
+ #if($column.javaField == 'id')
+ ${className}.setId(IdUtils.simpleUUID());
+ #end
#if($column.javaField == 'createTime')
${className}.setCreateTime(DateUtils.getNowDate());
#end
--
Gitblit v1.9.3