1
0

refactor: 优化代码架构

This commit is contained in:
2025-09-29 14:09:53 +08:00
parent 08cadc5f6f
commit bca64d3561
6 changed files with 92 additions and 24 deletions

View File

@@ -1,6 +1,5 @@
package com.lanyuanxiaoyao.service.template.jpa.entity;
import com.lanyuanxiaoyao.service.template.jpa.helper.SnowflakeId;
import jakarta.persistence.EntityListeners;
import jakarta.persistence.Id;
import jakarta.persistence.MappedSuperclass;

View File

@@ -1,4 +1,4 @@
package com.lanyuanxiaoyao.service.template.jpa.helper;
package com.lanyuanxiaoyao.service.template.jpa.entity;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;

View File

@@ -1,4 +1,4 @@
package com.lanyuanxiaoyao.service.template.jpa.helper;
package com.lanyuanxiaoyao.service.template.jpa.entity;
import java.io.Serializable;
import java.time.Instant;
@@ -9,7 +9,6 @@ import org.hibernate.id.factory.spi.StandardGenerator;
@Slf4j
public class SnowflakeIdGenerator implements IdentifierGenerator, StandardGenerator {
@Override
public Serializable generate(SharedSessionContractImplementor session, Object object) {
try {