diff --git a/asg_form/Controllers/Com.cs b/asg_form/Controllers/Com.cs index 7156e85..77f352a 100644 --- a/asg_form/Controllers/Com.cs +++ b/asg_form/Controllers/Com.cs @@ -36,7 +36,7 @@ namespace asg_form.Controllers { TestDbContext testDb = new TestDbContext(); string chinaname = user.chinaname; - var teamgame = testDb.team_Games.Where(a => a.commentary.IndexOf(chinaname) >= 0).Select(a => new { a.id, a.team1_name, a.team2_name, a.bilibiliuri, a.commentary, a.referee,a.judge ,a.opentime,a.team1_piaoshu,a.team2_piaoshu}).OrderByDescending(a => a.opentime).ToList(); + var teamgame = testDb.team_Games.Where(a => a.commentary.IndexOf(chinaname) >= 0).Select(a => new { a.id, a.team1_name, a.team2_name,a.belong,a.tag, a.bilibiliuri, a.commentary, a.referee,a.judge,a.person_type ,a.opentime,a.team1_piaoshu,a.team2_piaoshu}).OrderByDescending(a => a.opentime).ToList(); return JsonConvert.SerializeObject(teamgame); } diff --git a/asg_form/Controllers/Teamregistration/RegisterController.cs b/asg_form/Controllers/Teamregistration/RegisterController.cs index b530c8b..8041416 100644 --- a/asg_form/Controllers/Teamregistration/RegisterController.cs +++ b/asg_form/Controllers/Teamregistration/RegisterController.cs @@ -231,8 +231,8 @@ namespace asg_form.Controllers.Teamregistration var user = await userManager.Users.FirstOrDefaultAsync(u => u.Id == userId); if (query == null ) return Ok(new { code = 404, message = "用户1未找到" }); if (user == null) return Ok(new { code = 404, message = "用户2未找到" }); - query.status = "4"; - _ = user.officium == null; + query.status = "4"; + user.officium = null; await testDb.SaveChangesAsync(); await userManager.UpdateAsync(user); return Ok(new { code = 200, message = "修改成功" });