From cacf02681bfdda7926379d37d58ad1a21e398e1a Mon Sep 17 00:00:00 2001
From: lrj <owen.stl@gmail.com>
Date: 星期六, 04 十月 2025 19:08:12 +0800
Subject: [PATCH] fix(auth): 对无 Authorization 的 GraphQL 请求默认匿名放行到解析层,避免 400/403;公开查询仍优先识别后放行

---
 backend/src/main/java/com/rongyichuang/judge/repository/JudgeRepository.java |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/backend/src/main/java/com/rongyichuang/judge/repository/JudgeRepository.java b/backend/src/main/java/com/rongyichuang/judge/repository/JudgeRepository.java
index e2e495e..64c6153 100644
--- a/backend/src/main/java/com/rongyichuang/judge/repository/JudgeRepository.java
+++ b/backend/src/main/java/com/rongyichuang/judge/repository/JudgeRepository.java
@@ -24,8 +24,13 @@
     Optional<Judge> findByUserId(Long userId);
     
     /**
-     * 妫�鏌ヨ瘎濮旀槸鍚﹀弬涓庢寚瀹氭椿鍔�
+     * 妫�鏌ヨ瘎濮旀槸鍚﹀弬涓庢寚瀹氭椿鍔紙妫�鏌ユ槸鍚︽湁浠讳綍闃舵鐨勬潈闄愶級
      */
     @Query("SELECT COUNT(aj) > 0 FROM ActivityJudge aj WHERE aj.judgeId = :judgeId AND aj.activityId = :activityId")
     boolean existsByIdAndActivityId(@Param("judgeId") Long judgeId, @Param("activityId") Long activityId);
+
+    /**
+     * 鏍规嵁鐘舵�佺粺璁¤瘎濮旀暟閲�
+     */
+    long countByState(Integer state);
 }
\ No newline at end of file

--
Gitblit v1.8.0