|
@@ -2,6 +2,7 @@ package cn.com.qmth.stmms.ms.core.specification;
|
|
|
|
|
|
import cn.com.qmth.stmms.ms.commons.utils.specification.PagingAndSortingSpecification;
|
|
|
import cn.com.qmth.stmms.ms.core.domain.Student;
|
|
|
+import cn.com.qmth.stmms.ms.core.domain.enums.TrialEnum;
|
|
|
import org.springframework.data.jpa.domain.Specification;
|
|
|
|
|
|
import javax.persistence.criteria.Predicate;
|
|
@@ -114,6 +115,7 @@ public class StudentSpecification extends PagingAndSortingSpecification {
|
|
|
public Specification<Student> getSpecification() {
|
|
|
return (root, query, cb) -> {
|
|
|
List<Predicate> predicates = new ArrayList<Predicate>();
|
|
|
+ predicates.add(cb.equal(root.get("test"), String.valueOf(TrialEnum.DEFAULT.getId())));
|
|
|
if (getName() != null) {
|
|
|
predicates.add(cb.like(root.get("name"), "%" + getName() + "%"));
|
|
|
}
|