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 { @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 findExamByClassId(@Param("code")String code, @Param("classId")String classId, @Param("periodId")String periodId); }