You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
773 B

8 months ago
package cn.teammodel.repository;
import cn.teammodel.model.entity.common.Exam;
import cn.teammodel.model.vo.admin.ArtElementsVo;
import com.azure.spring.data.cosmos.repository.CosmosRepository;
import com.azure.spring.data.cosmos.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface ExamRepository extends CosmosRepository<Exam, String> {
@Query("select * from Exam as s where s.code = @code and array_contains(s.classes,@classId) and s.period.id = @periodId and s.progress = 'finish' order by s.createTime ")
List<Exam> findExamByClassId(@Param("code")String code, @Param("classId")String classId, @Param("periodId")String periodId);
}