Browse Source

父类字段保存丢失bug修复

mazq 1 year ago
parent
commit
077a1b7bd0

+ 2 - 0
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/entity/zerotrust/BaseEntity.java

@@ -7,6 +7,7 @@ import org.springframework.data.annotation.CreatedBy;
 import org.springframework.data.annotation.CreatedDate;
 
 import javax.persistence.Column;
+import javax.persistence.MappedSuperclass;
 import java.util.Date;
 
 /**
@@ -16,6 +17,7 @@ import java.util.Date;
  * @date 2023/3/13
  */
 @Data
+@MappedSuperclass
 public class BaseEntity {
 
     /** 创建人 */

+ 2 - 0
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/auth/entity/zerotrust/BaseUpdateEntity.java

@@ -6,6 +6,7 @@ import org.springframework.data.annotation.LastModifiedBy;
 import org.springframework.data.annotation.LastModifiedDate;
 
 import javax.persistence.Column;
+import javax.persistence.MappedSuperclass;
 import java.util.Date;
 
 /**
@@ -16,6 +17,7 @@ import java.util.Date;
  */
 @EqualsAndHashCode(callSuper = true)
 @Data
+@MappedSuperclass
 public class BaseUpdateEntity extends BaseEntity {
 
     /** 更新人 */