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/player/dto/PromotionCompetitionResponse.java |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/backend/src/main/java/com/rongyichuang/player/dto/PromotionCompetitionResponse.java b/backend/src/main/java/com/rongyichuang/player/dto/PromotionCompetitionResponse.java
index d5521b4..bcf3ffe 100644
--- a/backend/src/main/java/com/rongyichuang/player/dto/PromotionCompetitionResponse.java
+++ b/backend/src/main/java/com/rongyichuang/player/dto/PromotionCompetitionResponse.java
@@ -10,6 +10,7 @@
 public class PromotionCompetitionResponse {
     
     private Long id;
+    private Long competitionId;
     private String competitionName;
     private String stageName;
     private Integer maxParticipants;
@@ -26,6 +27,7 @@
     
     public PromotionCompetitionResponse(Activity competition, Activity stage, Integer currentCount) {
         this.id = stage.getId();
+        this.competitionId = competition.getId();
         this.competitionName = competition.getName();
         this.stageName = stage.getName();
         this.maxParticipants = stage.getPlayerMax();
@@ -49,6 +51,14 @@
         this.id = id;
     }
     
+    public Long getCompetitionId() {
+        return competitionId;
+    }
+    
+    public void setCompetitionId(Long competitionId) {
+        this.competitionId = competitionId;
+    }
+    
     public String getCompetitionName() {
         return competitionName;
     }

--
Gitblit v1.8.0