From b9000246a71bd78d4681adf70513a9741c6b84a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=82=9C=E7=BF=94?= <2307953404@qq.com> Date: Mon, 10 Mar 2025 21:36:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A1=E6=89=B9=E9=80=9A=E7=9F=A5=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=85=B7=E4=BD=93=E8=81=8C=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Teamregistration/RegisterController.cs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/asg_form/Controllers/Teamregistration/RegisterController.cs b/asg_form/Controllers/Teamregistration/RegisterController.cs index 361ef0c..6ed85ed 100644 --- a/asg_form/Controllers/Teamregistration/RegisterController.cs +++ b/asg_form/Controllers/Teamregistration/RegisterController.cs @@ -70,7 +70,12 @@ namespace asg_form.Controllers.Teamregistration using (TestDbContext sub = new TestDbContext()) { - + Dictionary Roles = new Dictionary(); + Roles.Add("Commentator", "解说"); + Roles.Add("Judge", "裁判"); + Roles.Add("Anchor", "导播"); + Roles.Add("FrontEnd", "开发前端"); + Roles.Add("BackEnd", "开发后端"); if (msg.id == null && sub.T_Comform.Any(n => n.user_id==msg.userId)) { @@ -100,7 +105,9 @@ namespace asg_form.Controllers.Teamregistration }; sub.T_Comform.Add(rgst); await sub.SaveChangesAsync(); - string mesg1 = $"[ASG管理系统]有新解说申请,请及时上后台系统审批。"; + string mesg1 = ""; + if (Roles.ContainsKey(msg.reqRole)) mesg1 = $"[ASG管理系统]有新{Roles[msg.reqRole]}申请,请及时上后台系统审批。"; + else mesg1 = $"[ASG管理系统]有新{msg.reqRole}申请,请及时上后台系统审批。"; string qqgroup1 = "925510646"; var atuserqq1 = "235593230"; try @@ -135,7 +142,9 @@ namespace asg_form.Controllers.Teamregistration query.req_role = msg.reqRole; query.intro_url = msg.introUrl; await sub.SaveChangesAsync(); - string mesg = $"[ASG管理系统]有新解说申请,请及时上后台系统审批。"; + string mesg = ""; + if (Roles.ContainsKey(msg.reqRole)) mesg = $"[ASG管理系统]有新{Roles[msg.reqRole]}申请,请及时上后台系统审批。"; + else mesg = $"[ASG管理系统]有新{msg.reqRole}申请,请及时上后台系统审批。"; string qqgroup = "925510646"; var atuserqq = "235593230"; try