From 606290e185b1c95b3379db39799f22fe02b39bcd Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期一, 08 一月 2024 12:04:44 +0800 Subject: [PATCH] !477 JustAuth 整合 TopIam 单点登录 Merge pull request !477 from 马铃薯头/dev --- ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/domain.java.vm | 31 +++++++++++++++++-------------- 1 files changed, 17 insertions(+), 14 deletions(-) diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/domain.java.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/domain.java.vm index 0ee607c..205fb73 100644 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/domain.java.vm +++ b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/domain.java.vm @@ -1,21 +1,23 @@ package ${packageName}.domain; +#foreach ($column in $columns) +#if($column.javaField=='tenantId') +#set($IsTenant=1) +#end +#end +#if($IsTenant==1) +import org.dromara.common.tenant.core.TenantEntity; +#else +import org.dromara.common.mybatis.core.domain.BaseEntity; +#end import com.baomidou.mybatisplus.annotation.*; import lombok.Data; import lombok.EqualsAndHashCode; -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; -import java.math.BigDecimal; - #foreach ($import in $importList) import ${import}; #end -#if($table.crud || $table.sub) -import com.ruoyi.common.core.web.domain.BaseEntity; -#elseif($table.tree) -import com.ruoyi.common.core.web.domain.TreeEntity; -#end + +import java.io.Serial; /** * ${functionName}瀵硅薄 ${tableName} @@ -23,10 +25,10 @@ * @author ${author} * @date ${datetime} */ -#if($table.crud || $table.sub) - #set($Entity="BaseEntity") -#elseif($table.tree) - #set($Entity="TreeEntity<${ClassName}>") +#if($IsTenant==1) +#set($Entity="TenantEntity") +#else +#set($Entity="BaseEntity") #end @Data @EqualsAndHashCode(callSuper = true) @@ -51,6 +53,7 @@ @TableId(value = "$column.columnName") #end private $column.javaType $column.javaField; + #end #end -- Gitblit v1.9.3