浏览代码

开机奖励从当前机具所属人开始查找

lcl 2 年之前
父节点
当前提交
a5d61c1288
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      AppStart/Helper/StatService.cs

+ 3 - 2
AppStart/Helper/StatService.cs

@@ -1041,10 +1041,11 @@ namespace MySystem
                                         if (user != null)
                                         if (user != null)
                                         {
                                         {
                                             function.WriteLog("所属人:" + user.MakerCode, "开机奖励发放日志");
                                             function.WriteLog("所属人:" + user.MakerCode, "开机奖励发放日志");
-                                            if (!string.IsNullOrEmpty(user.ParentNav))
+                                            string ParentNav = function.CheckNull(user.ParentNav) + "," + user.Id + ",";
+                                            if (!string.IsNullOrEmpty(ParentNav))
                                             {
                                             {
                                                 decimal Prize = 20;
                                                 decimal Prize = 20;
-                                                string[] ParentNavs = user.ParentNav.Trim(',').Replace(",,", ",").Split(',');
+                                                string[] ParentNavs = ParentNav.Trim(',').Replace(",,", ",").Split(',');
                                                 for (int i = ParentNavs.Length - 1; i >= 0; i--)
                                                 for (int i = ParentNavs.Length - 1; i >= 0; i--)
                                                 {
                                                 {
                                                     int UserId = int.Parse(ParentNavs[i]);
                                                     int UserId = int.Parse(ParentNavs[i]);