From f8dd3ef2d0b2ea50ae155025d4bf4acfd737e08a 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 22:30:36 +0800 Subject: [PATCH] 1 --- asg_form/Controllers/Com.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/asg_form/Controllers/Com.cs b/asg_form/Controllers/Com.cs index 0fe95d7..a255a5a 100644 --- a/asg_form/Controllers/Com.cs +++ b/asg_form/Controllers/Com.cs @@ -76,7 +76,7 @@ namespace asg_form.Controllers com.Add(new com_json { id = id.ToInt32(), chinaname = chinaname }); teamgame.commentary = JsonConvert.SerializeObject(com); await testDb.SaveChangesAsync(); - user.Integral = user.Integral+5; + user.Integral = user.Integral+1; await userManager.UpdateAsync(user); try { @@ -231,7 +231,7 @@ namespace asg_form.Controllers teamGame.referee_Id = null; await testDb.SaveChangesAsync(); - user.Integral = user.Integral - 5 > 0 ? user.Integral - 5 : 0; // 确保积分不会减少到负数 + user.Integral = user.Integral - 1 >= 0 ? user.Integral - 1 : 0; // 确保积分不会减少到负数 await userManager.UpdateAsync(user); try @@ -291,7 +291,7 @@ namespace asg_form.Controllers teamgame.judge = chinaname; teamgame.judge_Id = (int)(user.Id); await testDb.SaveChangesAsync(); - user.Integral += 5; + user.Integral += 1; await userManager.UpdateAsync(user); message += $"\r\n{teamgame.team1_name} VS {teamgame.team2_name}"; } @@ -340,7 +340,7 @@ namespace asg_form.Controllers teamGame.judge_Id = null; await testDb.SaveChangesAsync(); - user.Integral = user.Integral - 5 > 0 ? user.Integral - 5 : 0; // 确保积分不会减少到负数 + user.Integral = user.Integral - 1 >= 0 ? user.Integral - 1 : 0; // 确保积分不会减少到负数 await userManager.UpdateAsync(user); try