From 2fda1e8487d854a3b383e59fb0ba0338e19d7d51 Mon Sep 17 00:00:00 2001 From: JH <935007339@qq.com> Date: Sat, 10 Feb 2024 17:33:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9C=9F=E5=88=8A=E6=9B=B2?= =?UTF-8?q?=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/luoo/music/pojo/Journal.java | 3 +-- .../src/main/java/com/luoo/music/pojo/Tag.java | 18 ++++++++---------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/luoo_music/src/main/java/com/luoo/music/pojo/Journal.java b/luoo_music/src/main/java/com/luoo/music/pojo/Journal.java index 7f97b70..891d007 100644 --- a/luoo_music/src/main/java/com/luoo/music/pojo/Journal.java +++ b/luoo_music/src/main/java/com/luoo/music/pojo/Journal.java @@ -22,8 +22,7 @@ import java.time.LocalDateTime; @Entity @DynamicInsert @DynamicUpdate -// @Table(name="tb_journal") -@Table(name="tb_journal_copy1") +@Table(name="tb_journal") @EntityListeners(AuditingEntityListener.class) public class Journal implements Serializable{ diff --git a/luoo_music/src/main/java/com/luoo/music/pojo/Tag.java b/luoo_music/src/main/java/com/luoo/music/pojo/Tag.java index d64cf77..9a4d5f2 100644 --- a/luoo_music/src/main/java/com/luoo/music/pojo/Tag.java +++ b/luoo_music/src/main/java/com/luoo/music/pojo/Tag.java @@ -1,17 +1,21 @@ package com.luoo.music.pojo; -import lombok.*; +import lombok.Getter; +import lombok.RequiredArgsConstructor; +import lombok.Setter; +import lombok.ToString; import org.hibernate.proxy.HibernateProxy; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.annotation.LastModifiedDate; import org.springframework.data.jpa.domain.support.AuditingEntityListener; -import javax.persistence.*; +import javax.persistence.Entity; +import javax.persistence.EntityListeners; +import javax.persistence.Id; +import javax.persistence.Table; import java.io.Serializable; import java.time.LocalDateTime; -import java.util.ArrayList; -import java.util.List; import java.util.Objects; @Getter @@ -84,12 +88,6 @@ public class Tag implements Serializable { @LastModifiedDate private LocalDateTime updateTime; - @ManyToMany(mappedBy = "tags") - private List journals = new ArrayList<>(); - - @ManyToMany(mappedBy = "tags") - private List songs = new ArrayList<>(); - @Override public final boolean equals(Object o) { if (this == o) return true;