Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
1e580181a4
@ -1,12 +1,16 @@
|
|||||||
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.persistence.Entity;
|
import javax.annotation.Generated;
|
||||||
|
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 {
|
||||||
|
@ -0,0 +1,17 @@
|
|||||||
|
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);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.codesdream.ase.repository.robot;
|
||||||
|
|
||||||
|
|
||||||
|
import com.codesdream.ase.model.robot.Faq;
|
||||||
|
import com.codesdream.ase.model.student.Honor;
|
||||||
|
import org.springframework.data.domain.Sort;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface FaqRepository extends JpaRepository<Faq, Integer> {
|
||||||
|
|
||||||
|
Faq findByAnswer(String answer);
|
||||||
|
Faq findByAnswer(String answer, Sort sort);
|
||||||
|
}
|
@ -1,6 +1,7 @@
|
|||||||
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;
|
||||||
@ -11,4 +12,7 @@ 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(String parentId, Sort sort);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user