Browse Source

同行奖励入库,操作频繁限制

lcl 6 months ago
parent
commit
c555447995
1 changed files with 6 additions and 0 deletions
  1. 6 0
      Areas/Api/Controllers/OutApiController.cs

+ 6 - 0
Areas/Api/Controllers/OutApiController.cs

@@ -135,6 +135,12 @@ namespace MySystem.Areas.Api.Controllers.v1
         [Route("/leader/prize/do")]
         public string LeaderPrize(string month)
         {
+            if(RedisDbconn.Instance.Get<string>("LeaderTxjPrizeFlag") == "1")
+            {
+                return "请勿频繁操作";
+            }
+            RedisDbconn.Instance.Set("LeaderTxjPrizeFlag", "1");
+            RedisDbconn.Instance.SetExpire("LeaderTxjPrizeFlag", 600);
             DateTime start = DateTime.Parse(month + "-01 00:00:00");
             DateTime end = start.AddMonths(1);
             Dictionary<string, string> txjList = TxjList();