From b68b576b8cf9126bafd25cff31530dd5e6d2fa50 Mon Sep 17 00:00:00 2001 From: "hhb@hotmail.com" Date: Sat, 12 Oct 2024 17:08:07 +0800 Subject: [PATCH] update --- src/main/java/cn/teammodel/repository/ArtRepository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/cn/teammodel/repository/ArtRepository.java b/src/main/java/cn/teammodel/repository/ArtRepository.java index b2552de..a2f767e 100644 --- a/src/main/java/cn/teammodel/repository/ArtRepository.java +++ b/src/main/java/cn/teammodel/repository/ArtRepository.java @@ -14,7 +14,7 @@ public interface ArtRepository extends CosmosRepository { /** * 动态投影, 查询还是要将所有的值查出来,类的动态查询不能嵌套 */ - @Query("select s.id,s.name,s.classes,s.startTime,s.endTime,s.subjects,s.progress,s.settings from Art as s where s.period.id = @periodId and s.code = @code " + + @Query("select s.id,s.name,s.classes,s.startTime,s.endTime,s.subjects,s.progress,s.settings from Art as s where s.progress = 'finish' and s.period.id = @periodId and s.code = @code " + "and (IS_NULL(@startTime) or s.startTime >= @startTime) " + "and (IS_NULL(@endTime) or s.startTime < @endTime) ") List findPeriodById(@Param("periodId")String periodId, @Param("code")String code, @Param("startTime")Long startTime, @Param("endTime")Long endTime);