From 4444bee0b650571a253718a650064f7238861e09 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Fri, 20 Jun 2025 10:34:44 +0800 Subject: [PATCH 1/5] =?UTF-8?q?fixed=20tzb2025=E5=BD=93=E5=89=8D=E6=88=98?= =?UTF-8?q?=E9=98=9F=E5=B7=B2=E6=8A=A5=E5=90=8D=EF=BC=8C=E8=AF=B7=E5=8B=BF?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=8A=A5=E5=90=8D=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/competition_infos_controller.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/controllers/competition_infos_controller.rb b/app/controllers/competition_infos_controller.rb index 066e7ae1b..5e411f3e7 100644 --- a/app/controllers/competition_infos_controller.rb +++ b/app/controllers/competition_infos_controller.rb @@ -355,6 +355,11 @@ class CompetitionInfosController < ApplicationController end competition_user.status = 2 end + if @competition_info.identifier.to_s.downcase.include?("tzb2025") + if CompetitionUser.where(ext4: competition_user.ext4).where(ext5: competition_user.ext4).present? + tip_exception "当前战队已报名,请勿重新报名。" + end + end competition_user.save render_ok end @@ -374,6 +379,12 @@ class CompetitionInfosController < ApplicationController end competition_user.status = 2 end + if @competition_info.identifier.to_s.downcase.include?("tzb2025") + if CompetitionUser.where(ext4: competition_user.ext4).where(ext5: competition_user.ext4) + .where.not(id: competition_user.id).present? + tip_exception "当前战队已报名,请勿重新报名。" + end + end competition_user.save render_ok end From 69f27d4fdcfc9ab134a91ff6c8fd00481e560e69 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Fri, 20 Jun 2025 10:53:55 +0800 Subject: [PATCH 2/5] =?UTF-8?q?fixed=20tzb2025=E5=BD=93=E5=89=8D=E6=88=98?= =?UTF-8?q?=E9=98=9F=E5=B7=B2=E6=8A=A5=E5=90=8D=EF=BC=8C=E8=AF=B7=E5=8B=BF?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=8A=A5=E5=90=8D=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/competition_infos_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/competition_infos_controller.rb b/app/controllers/competition_infos_controller.rb index 5e411f3e7..8101abcd0 100644 --- a/app/controllers/competition_infos_controller.rb +++ b/app/controllers/competition_infos_controller.rb @@ -357,7 +357,7 @@ class CompetitionInfosController < ApplicationController end if @competition_info.identifier.to_s.downcase.include?("tzb2025") if CompetitionUser.where(ext4: competition_user.ext4).where(ext5: competition_user.ext4).present? - tip_exception "当前战队已报名,请勿重新报名。" + tip_exception "该参赛团队报名表已提交,无法再次提交。" end end competition_user.save @@ -382,7 +382,7 @@ class CompetitionInfosController < ApplicationController if @competition_info.identifier.to_s.downcase.include?("tzb2025") if CompetitionUser.where(ext4: competition_user.ext4).where(ext5: competition_user.ext4) .where.not(id: competition_user.id).present? - tip_exception "当前战队已报名,请勿重新报名。" + tip_exception "该参赛团队报名表已提交,无法再次提交。" end end competition_user.save From 82186872a2dc8b7e9384cb3c7690b64c74b7a3ea Mon Sep 17 00:00:00 2001 From: xxq250 Date: Fri, 20 Jun 2025 11:04:37 +0800 Subject: [PATCH 3/5] =?UTF-8?q?fixed=20tzb2025=E5=BD=93=E5=89=8D=E6=88=98?= =?UTF-8?q?=E9=98=9F=E5=B7=B2=E6=8A=A5=E5=90=8D=EF=BC=8C=E8=AF=B7=E5=8B=BF?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=8A=A5=E5=90=8D=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/competition_infos_controller.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/controllers/competition_infos_controller.rb b/app/controllers/competition_infos_controller.rb index 8101abcd0..55e792880 100644 --- a/app/controllers/competition_infos_controller.rb +++ b/app/controllers/competition_infos_controller.rb @@ -356,7 +356,8 @@ class CompetitionInfosController < ApplicationController competition_user.status = 2 end if @competition_info.identifier.to_s.downcase.include?("tzb2025") - if CompetitionUser.where(ext4: competition_user.ext4).where(ext5: competition_user.ext4).present? + if CompetitionUser.where(competition_info: @competition_info.id) + .where(ext4: competition_user.ext4).where(ext5: competition_user.ext5).present? tip_exception "该参赛团队报名表已提交,无法再次提交。" end end @@ -380,8 +381,8 @@ class CompetitionInfosController < ApplicationController competition_user.status = 2 end if @competition_info.identifier.to_s.downcase.include?("tzb2025") - if CompetitionUser.where(ext4: competition_user.ext4).where(ext5: competition_user.ext4) - .where.not(id: competition_user.id).present? + if CompetitionUser.where(competition_info: @competition_info.id) + .where(ext4: competition_user.ext4).where(ext5: competition_user.ext5).present? tip_exception "该参赛团队报名表已提交,无法再次提交。" end end From f3695a35e8f29711cf664016a7f35697f1e02889 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Fri, 20 Jun 2025 11:38:30 +0800 Subject: [PATCH 4/5] =?UTF-8?q?fixed=20tzb2025=E5=BD=93=E5=89=8D=E6=88=98?= =?UTF-8?q?=E9=98=9F=E5=B7=B2=E6=8A=A5=E5=90=8D=EF=BC=8C=E8=AF=B7=E5=8B=BF?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=8A=A5=E5=90=8D=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/competition_infos_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/competition_infos_controller.rb b/app/controllers/competition_infos_controller.rb index 55e792880..b52065812 100644 --- a/app/controllers/competition_infos_controller.rb +++ b/app/controllers/competition_infos_controller.rb @@ -382,7 +382,8 @@ class CompetitionInfosController < ApplicationController end if @competition_info.identifier.to_s.downcase.include?("tzb2025") if CompetitionUser.where(competition_info: @competition_info.id) - .where(ext4: competition_user.ext4).where(ext5: competition_user.ext5).present? + .where(ext4: competition_user.ext4).where(ext5: competition_user.ext5) + .where(status: [1, 2, 3]).where.not(id: competition_user.id).present? tip_exception "该参赛团队报名表已提交,无法再次提交。" end end From 6258780f273a4a2d41cfcab3e411ac66d53aca14 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Fri, 20 Jun 2025 11:38:58 +0800 Subject: [PATCH 5/5] =?UTF-8?q?fixed=20tzb2025=E5=BD=93=E5=89=8D=E6=88=98?= =?UTF-8?q?=E9=98=9F=E5=B7=B2=E6=8A=A5=E5=90=8D=EF=BC=8C=E8=AF=B7=E5=8B=BF?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=8A=A5=E5=90=8D=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/competition_infos_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/competition_infos_controller.rb b/app/controllers/competition_infos_controller.rb index b52065812..ccbfdf046 100644 --- a/app/controllers/competition_infos_controller.rb +++ b/app/controllers/competition_infos_controller.rb @@ -356,7 +356,7 @@ class CompetitionInfosController < ApplicationController competition_user.status = 2 end if @competition_info.identifier.to_s.downcase.include?("tzb2025") - if CompetitionUser.where(competition_info: @competition_info.id) + if CompetitionUser.where(competition_info: @competition_info.id).where(status: [1, 2, 3]) .where(ext4: competition_user.ext4).where(ext5: competition_user.ext5).present? tip_exception "该参赛团队报名表已提交,无法再次提交。" end