Sfoglia il codice sorgente

补开机奖增加上级未满足条件的提示信息

lichunlei 4 anni fa
parent
commit
cc363ff249
1 ha cambiato i file con 16 aggiunte e 1 eliminazioni
  1. 16 1
      Areas/Admin/Controllers/MainServer/SysToolsController.cs

+ 16 - 1
Areas/Admin/Controllers/MainServer/SysToolsController.cs

@@ -1753,6 +1753,7 @@ namespace MySystem.Areas.Admin.Controllers
                 if (!string.IsNullOrEmpty(user.ParentNav))
                 {
                     decimal Prize = 20;
+                    List<string> PrizeFlag = new List<string>();
                     string[] ParentNavs = user.ParentNav.Trim(',').Replace(",,", ",").Split(',');
                     for (int i = ParentNavs.Length - 1; i >= 0; i--)
                     {
@@ -1888,10 +1889,24 @@ namespace MySystem.Areas.Admin.Controllers
                                 RedisDbconn.Instance.AddNumber("UserAccount:" + puser.Id + ":1:" + monthString, Prize);
 
                                 Prize -= 10;
+                                PrizeFlag.Add(Prize.ToString("f0"));
                             }
                         }
                     }
-                    return "发放成功";
+                    string result = "";
+                    if(!PrizeFlag.Contains("20"))
+                    {
+                        result += "20元奖励未发,请检查上级是否满足条件\n";
+                    }
+                    if(!PrizeFlag.Contains("10"))
+                    {
+                        result += "10元奖励未发,请检查上级是否满足条件\n";
+                    }
+                    if(string.IsNullOrEmpty(result))
+                    {
+                        return "发放成功";
+                    }
+                    return result;
                 }
             }
             db.Dispose();