From ac05b505cc82ff8c62410c3f056a3899b843d51a Mon Sep 17 00:00:00 2001 From: chuyan <1047381936@qq.com> Date: Thu, 10 Sep 2020 21:29:19 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/codesdream/ase/model/parent/Parent.java | 6 +----- .../ase/repository/activity/ActivityRepository.java | 8 ++------ 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/codesdream/ase/model/parent/Parent.java b/src/main/java/com/codesdream/ase/model/parent/Parent.java index 7fb7617..4a1c72f 100644 --- a/src/main/java/com/codesdream/ase/model/parent/Parent.java +++ b/src/main/java/com/codesdream/ase/model/parent/Parent.java @@ -1,16 +1,12 @@ package com.codesdream.ase.model.parent; -import com.codesdream.ase.model.mark.Tag; import com.codesdream.ase.model.permission.User; import lombok.Data; import lombok.EqualsAndHashCode; -import javax.annotation.Generated; -import javax.persistence.*; -import java.util.List; +import javax.persistence.Entity; @Entity -@Table @Data @EqualsAndHashCode(callSuper = false) public class Parent extends User { diff --git a/src/main/java/com/codesdream/ase/repository/activity/ActivityRepository.java b/src/main/java/com/codesdream/ase/repository/activity/ActivityRepository.java index c8d7d90..4d10e4f 100644 --- a/src/main/java/com/codesdream/ase/repository/activity/ActivityRepository.java +++ b/src/main/java/com/codesdream/ase/repository/activity/ActivityRepository.java @@ -1,7 +1,6 @@ package com.codesdream.ase.repository.activity; import com.codesdream.ase.model.activity.Activity; -import com.codesdream.ase.model.permission.User; import org.springframework.data.domain.Sort; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; @@ -14,10 +13,7 @@ public interface ActivityRepository extends JpaRepository { List findByTitle(String title); List findByTitle(String title, Sort sort); - List findByCreator(User creator); - List findByCreator(User creator, Sort sort); - - List findByManager(User manager); - List findByManager(User manager, Sort sort); + List findByCreatorId(int creator); + List findByCreatorId(int creator, Sort sort); }