审批通知添加具体职位

This commit is contained in:
王炜翔 2025-03-10 21:36:08 +08:00
parent d8402bdeb1
commit b9000246a7

View File

@ -70,7 +70,12 @@ namespace asg_form.Controllers.Teamregistration
using (TestDbContext sub = new TestDbContext()) using (TestDbContext sub = new TestDbContext())
{ {
Dictionary<string, string> Roles = new Dictionary<string, string>();
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)) 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); sub.T_Comform.Add(rgst);
await sub.SaveChangesAsync(); 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"; string qqgroup1 = "925510646";
var atuserqq1 = "235593230"; var atuserqq1 = "235593230";
try try
@ -135,7 +142,9 @@ namespace asg_form.Controllers.Teamregistration
query.req_role = msg.reqRole; query.req_role = msg.reqRole;
query.intro_url = msg.introUrl; query.intro_url = msg.introUrl;
await sub.SaveChangesAsync(); 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"; string qqgroup = "925510646";
var atuserqq = "235593230"; var atuserqq = "235593230";
try try