对远端代码进行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;
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 {
int studentId;
}

View File

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

View File

@ -1,17 +1,15 @@
package com.codesdream.ase.repository.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.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Optional;
@Repository
public interface ParentRepository extends JpaRepository<Parent,Integer> {
List<Parent> findByStudentId(String studentId);
List<Parent> findByStudentId(String studentId, Sort sort);
List<Parent> findByStudentId(int studentId);
List<Parent> findByStudentId(int studentId, Sort sort);
}

View File

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