对远端代码进行bug修复

This commit is contained in:
chuyan 2020-09-12 21:14:09 +08:00
parent 1e580181a4
commit 95fdf7d063
4 changed files with 7 additions and 15 deletions

View File

@ -1,18 +1,15 @@
package com.codesdream.ase.model.parent; package com.codesdream.ase.model.parent;
import com.codesdream.ase.model.mark.Tag;
import com.codesdream.ase.model.permission.User; import com.codesdream.ase.model.permission.User;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import javax.annotation.Generated; import javax.persistence.Entity;
import javax.persistence.*;
import java.util.List;
@Entity @Entity
@Table
@Data @Data
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
public class Parent extends User { public class Parent extends User {
int studentId;
} }

View File

@ -13,6 +13,7 @@ import java.util.Map;
@Data @Data
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
public class Student extends User { public class Student extends User {
int parentId;
String profilePicture; String profilePicture;

View File

@ -1,17 +1,15 @@
package com.codesdream.ase.repository.parent; package com.codesdream.ase.repository.parent;
import com.codesdream.ase.model.parent.Parent; import com.codesdream.ase.model.parent.Parent;
import com.codesdream.ase.model.student.Student;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List; import java.util.List;
import java.util.Optional;
@Repository @Repository
public interface ParentRepository extends JpaRepository<Parent,Integer> { public interface ParentRepository extends JpaRepository<Parent,Integer> {
List<Parent> findByStudentId(String studentId); List<Parent> findByStudentId(int studentId);
List<Parent> findByStudentId(String studentId, Sort sort); List<Parent> findByStudentId(int studentId, Sort sort);
} }

View File

@ -1,18 +1,14 @@
package com.codesdream.ase.repository.student; package com.codesdream.ase.repository.student;
import com.codesdream.ase.model.student.Student; import com.codesdream.ase.model.student.Student;
import com.codesdream.ase.model.student.StudentCourse;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Optional;
@Repository @Repository
public interface StudentRepository extends JpaRepository<Student, Integer> { public interface StudentRepository extends JpaRepository<Student, Integer> {
Student findByParentId(String parentId); Student findByParentId(int parentId);
Student findByParentId(String parentId, Sort sort); Student findByParentId(int parentId, Sort sort);
} }