@ -14,11 +14,11 @@ import java.util.List;
public interface PtTeacherRepository extends CosmosRepository < PtTeacherInfo , String > {
public interface PtTeacherRepository extends CosmosRepository < PtTeacherInfo , String > {
PtTeacherInfo findByIdAndCode ( String id , String code ) ;
PtTeacherInfo findByIdAndCode ( String id , String code ) ;
@Query ( value = "SELECT * FROM c WHERE ARRAY_CONTAINS(@pairs, {id: c.id, code: c.code}, true) and c.pk = 'PtTeacher' and c.state = 1 ")
@Query ( value = "SELECT * FROM c WHERE ARRAY_CONTAINS(@pairs, {id: c.id, code: c.code}, true) and c.pk = 'PtTeacher' and c.state = 1 and c.status != 'delete' " )
List < PtTeacherInfo > findByIdCodePairs ( @Param ( "pairs" ) List < IdCodePair > pairs ) ;
List < PtTeacherInfo > findByIdCodePairs ( @Param ( "pairs" ) List < IdCodePair > pairs ) ;
@Query ( value = "SELECT * FROM c WHERE c.pk = 'PtTeacher' and c.school = @school and c.code = @code and c.state = 1 ")
@Query ( value = "SELECT * FROM c WHERE c.pk = 'PtTeacher' and c.school = @school and c.code = @code and c.state = 1 and c.status != 'delete' ")
List < PtTeacherInfo > findAllTeacher ( String school , String code ) ;
List < PtTeacherInfo > findAllTeacher ( String school , String code ) ;
@Query ( value = "SELECT * FROM c WHERE c.pk = 'PtTeacher' and c.code = @code and c.state = 1 ")
@Query ( value = "SELECT * FROM c WHERE c.pk = 'PtTeacher' and c.code = @code and c.state = 1 and c.status != 'delete' ")
List < PtTeacherInfo > findByCode ( String code ) ;
List < PtTeacherInfo > findByCode ( String code ) ;
}
}