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