Browse Source

职级取值问题

lcl 1 month ago
parent
commit
81004c5d55

+ 21 - 0
KxsUserModels/KxsExamQuestionLog.cs

@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsUserModels
+{
+    public partial class KxsExamQuestionLog
+    {
+        public int Id { get; set; }
+        public string Remark { get; set; }
+        public string NameSign { get; set; }
+        public int HandFlag { get; set; }
+        public int Status { get; set; }
+        public int UserId { get; set; }
+        public int QuestionCategory { get; set; }
+        public string CreateBy { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+        public int DelFlag { get; set; }
+        public int Version { get; set; }
+    }
+}

+ 20 - 0
KxsUserModels/KxsInviteKing.cs

@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsUserModels
+{
+    public partial class KxsInviteKing
+    {
+        public int Id { get; set; }
+        public int Kind { get; set; }
+        public int StepNum { get; set; }
+        public int UserId { get; set; }
+        public int TradeMonth { get; set; }
+        public string UpdateBy { get; set; }
+        public string CreateBy { get; set; }
+        public int Version { get; set; }
+        public string DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+    }
+}

+ 26 - 0
KxsUserModels/KxsProfitInit2025.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsUserModels
+{
+    public partial class KxsProfitInit2025
+    {
+        public int Id { get; set; }
+        public int FromUserId { get; set; }
+        public int Status { get; set; }
+        public string MessageId { get; set; }
+        public int ProfitMonth { get; set; }
+        public decimal ProfitAmt { get; set; }
+        public int UserId { get; set; }
+        public int ProfitType { get; set; }
+        public int BrandId { get; set; }
+        public DateTime? CreateTime { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public string DelFlag { get; set; }
+        public int Version { get; set; }
+        public string Remark { get; set; }
+        public int Level { get; set; }
+        public decimal TradeAmt { get; set; }
+        public decimal Rate { get; set; }
+    }
+}

+ 26 - 0
KxsUserModels/KxsProfitInitBefore2025.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsUserModels
+{
+    public partial class KxsProfitInitBefore2025
+    {
+        public int Id { get; set; }
+        public int FromUserId { get; set; }
+        public int Status { get; set; }
+        public string MessageId { get; set; }
+        public int ProfitMonth { get; set; }
+        public decimal ProfitAmt { get; set; }
+        public int UserId { get; set; }
+        public int ProfitType { get; set; }
+        public int BrandId { get; set; }
+        public DateTime? CreateTime { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public string DelFlag { get; set; }
+        public int Version { get; set; }
+        public string Remark { get; set; }
+        public int Level { get; set; }
+        public decimal TradeAmt { get; set; }
+        public decimal Rate { get; set; }
+    }
+}

+ 22 - 0
KxsUserModels/KxsShdLeader.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsUserModels
+{
+    public partial class KxsShdLeader
+    {
+        public int Id { get; set; }
+        public int ShdType { get; set; }
+        public decimal SourceBonusAmt { get; set; }
+        public int SourceUserId { get; set; }
+        public int UserId { get; set; }
+        public decimal TradeAmt { get; set; }
+        public string UpdateBy { get; set; }
+        public string CreateBy { get; set; }
+        public int Version { get; set; }
+        public string DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+        public int TradeMonth { get; set; }
+    }
+}

+ 26 - 0
KxsUserModels/KxsShdLeaderCheck.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsUserModels
+{
+    public partial class KxsShdLeaderCheck
+    {
+        public int Id { get; set; }
+        public string StatMonth { get; set; }
+        public int BigMarketCount { get; set; }
+        public decimal TotalTradeAmount { get; set; }
+        public decimal SmallTradeAmount { get; set; }
+        public int DeepStaCount { get; set; }
+        public int StaCount { get; set; }
+        public int LeaderType { get; set; }
+        public string PidPath { get; set; }
+        public int Pid { get; set; }
+        public int UserId { get; set; }
+        public string UpdateBy { get; set; }
+        public string CreateBy { get; set; }
+        public int Version { get; set; }
+        public string DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+    }
+}

+ 8 - 0
KxsUserModels/KxsShdScore.cs

@@ -17,5 +17,13 @@ namespace MySystem.KxsUserModels
         public string DelFlag { get; set; }
         public DateTime? UpdateTime { get; set; }
         public DateTime? CreateTime { get; set; }
+        public int EyasScore { get; set; }
+        public int PrivateScore { get; set; }
+        public decimal ShdBonusAmt { get; set; }
+        public decimal EyasBonusAmt { get; set; }
+        public decimal PrivateBonusAmt { get; set; }
+        public decimal FirstBonusAmt { get; set; }
+        public decimal CenterBonusAmt { get; set; }
+        public decimal HighBonusAmt { get; set; }
     }
 }

+ 4 - 0
KxsUserModels/KxsShdTradeAmt.cs

@@ -16,5 +16,9 @@ namespace MySystem.KxsUserModels
         public string DelFlag { get; set; }
         public DateTime? UpdateTime { get; set; }
         public DateTime? CreateTime { get; set; }
+        public decimal EyasTradeAmt { get; set; }
+        public decimal EyasBonusPool { get; set; }
+        public decimal PrivateTradeAmt { get; set; }
+        public decimal PrivateBonusPool { get; set; }
     }
 }

+ 6 - 1
KxsUserModels/KxsTradeLevelLog.cs

@@ -5,7 +5,7 @@ namespace MySystem.KxsUserModels
 {
     public partial class KxsTradeLevelLog
     {
-        public int Id { get; set; }
+        public long Id { get; set; }
         public decimal TradeAmt { get; set; }
         public int TradeMonth { get; set; }
         public string Remark { get; set; }
@@ -16,5 +16,10 @@ namespace MySystem.KxsUserModels
         public int DelFlag { get; set; }
         public DateTime? UpdateTime { get; set; }
         public DateTime? CreateTime { get; set; }
+        public string PidPath { get; set; }
+        public int LeaderLevel { get; set; }
+        public int PreLevel { get; set; }
+        public int BeforePreLevel { get; set; }
+        public int UserLevel { get; set; }
     }
 }

+ 2 - 0
KxsUserModels/KxsUser.cs

@@ -33,5 +33,7 @@ namespace MySystem.KxsUserModels
         public string UpdateBy { get; set; }
         public string CreateBy { get; set; }
         public DateTime? LogoutTime { get; set; }
+        public decimal ThisMonthTradeSelf { get; set; }
+        public decimal LevelIndex { get; set; }
     }
 }

+ 25 - 0
KxsUserModels/KxsUserAmountLog202501.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsUserModels
+{
+    public partial class KxsUserAmountLog202501
+    {
+        public int Id { get; set; }
+        public decimal AfterTotalAmount { get; set; }
+        public decimal BeforeTotalAmount { get; set; }
+        public int BrandId { get; set; }
+        public string Remark { get; set; }
+        public string Kind { get; set; }
+        public string VariationCause { get; set; }
+        public int VariationType { get; set; }
+        public decimal Amount { get; set; }
+        public decimal AfterAmount { get; set; }
+        public decimal BeforeAmount { get; set; }
+        public int UserId { get; set; }
+        public int Version { get; set; }
+        public int DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+    }
+}

+ 25 - 0
KxsUserModels/KxsUserAmountLog202502.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsUserModels
+{
+    public partial class KxsUserAmountLog202502
+    {
+        public int Id { get; set; }
+        public decimal AfterTotalAmount { get; set; }
+        public decimal BeforeTotalAmount { get; set; }
+        public int BrandId { get; set; }
+        public string Remark { get; set; }
+        public string Kind { get; set; }
+        public string VariationCause { get; set; }
+        public int VariationType { get; set; }
+        public decimal Amount { get; set; }
+        public decimal AfterAmount { get; set; }
+        public decimal BeforeAmount { get; set; }
+        public int UserId { get; set; }
+        public int Version { get; set; }
+        public int DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+    }
+}

+ 23 - 0
KxsUserModels/KxsUserProfitLog.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsUserModels
+{
+    public partial class KxsUserProfitLog
+    {
+        public int Id { get; set; }
+        public decimal ZlbProfitAmt { get; set; }
+        public decimal GdProfitAmt { get; set; }
+        public decimal LkbProfitAmt { get; set; }
+        public decimal PosProfitAmt { get; set; }
+        public decimal ServerFee { get; set; }
+        public int ProfitMonth { get; set; }
+        public int UserId { get; set; }
+        public string UpdateBy { get; set; }
+        public string CreateBy { get; set; }
+        public int Version { get; set; }
+        public string DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+    }
+}

+ 25 - 0
KxsUserModels/KxsUserTradeInfo.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsUserModels
+{
+    public partial class KxsUserTradeInfo
+    {
+        public long Id { get; set; }
+        public int RequiredCountSelf { get; set; }
+        public int IsVip { get; set; }
+        public decimal TradeAmtExt { get; set; }
+        public int VipCount { get; set; }
+        public decimal LevelIndex { get; set; }
+        public decimal TradeAmtSelf { get; set; }
+        public decimal TradeAmt { get; set; }
+        public int UserId { get; set; }
+        public int TradeMonth { get; set; }
+        public string UpdateBy { get; set; }
+        public string CreateBy { get; set; }
+        public int Version { get; set; }
+        public string DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+    }
+}

File diff suppressed because it is too large
+ 872 - 56
KxsUserModels/WebCMSEntities.cs


+ 23 - 11
Util/HaoDa/ProfitAfterHelper.cs

@@ -183,6 +183,7 @@ namespace MySystem
             LogHelper.Instance.WriteLog("\n\nTotalAmount:" + TotalAmount + ";", "来客吧分润日志");
             string Month = DateTime.Now.AddMonths(-1).ToString("yyyyMM");
             WebCMSEntities db = new WebCMSEntities();
+            KxsUserModels.WebCMSEntities udb = new KxsUserModels.WebCMSEntities();
             List<UserLevelSet> levels = db.UserLevelSet.ToList();
             List<ProfitResult> result = new List<ProfitResult>();
             ProfitObjects obj = db.ProfitObjects.FirstOrDefault();
@@ -228,7 +229,7 @@ namespace MySystem
                         {
                             user = users[curFloor - 1];
                         }
-                        SubUser selfUser = GetUser(user.UserId, Month) ?? new SubUser();
+                        SubUser selfUser = GetUser(udb, user.UserId, int.Parse(Month)) ?? new SubUser();
                         int UserLevel = GetUserLevel(selfUser); //当前会员等级
                         //判断当前创客是否有直推的激活机具,并且在活动时间内
                         if (curLevel == maxLevel)
@@ -283,23 +284,34 @@ namespace MySystem
                 }
             }
             db.Dispose();
+            udb.Dispose();
             return result;
         }
 
-        public SubUser GetUser(int UserId, string Month)
+        public SubUser GetUser(KxsUserModels.WebCMSEntities db, int UserId, int Month)
         {
             SubUser user = new SubUser();
-            DataTable dt = GetDataTable("select * from kxs_trade_level_log where trade_month=" + Month + " and version=0 and user_id=" + UserId);
-            if (dt.Rows.Count > 0)
+            KxsUserModels.KxsTradeLevelLog log = db.KxsTradeLevelLog.FirstOrDefault(m => m.TradeMonth == Month && m.Version == 1 && m.UserId == UserId);
+            if(log != null)
             {
-                user.Id = int.Parse(dt.Rows[0]["user_id"].ToString());
-                // user.ParentUserId = int.Parse(dt.Rows[0]["ParentUserId"].ToString());
-                user.Level = int.Parse(dt.Rows[0]["level"].ToString());
-                user.ParentNav = dt.Rows[0]["pid_path"].ToString();
-                user.UserLevel = int.Parse(dt.Rows[0]["user_level"].ToString());
-                user.PreUserLevel = int.Parse(dt.Rows[0]["pre_level"].ToString());
-                user.PreLeaderLevel = int.Parse(dt.Rows[0]["leader_level"].ToString());
+                user.Id = log.UserId;
+                user.Level = log.Level;
+                user.ParentNav = log.PidPath;
+                user.UserLevel = log.UserLevel;
+                user.PreUserLevel = log.PreLevel;
+                user.PreLeaderLevel = log.LeaderLevel;;
             }
+            // DataTable dt = GetDataTable("select * from kxs_trade_level_log where trade_month=" + Month + " and version=0 and user_id=" + UserId);
+            // if (dt.Rows.Count > 0)
+            // {
+            //     user.Id = int.Parse(dt.Rows[0]["user_id"].ToString());
+            //     // user.ParentUserId = int.Parse(dt.Rows[0]["ParentUserId"].ToString());
+            //     user.Level = int.Parse(dt.Rows[0]["level"].ToString());
+            //     user.ParentNav = dt.Rows[0]["pid_path"].ToString();
+            //     user.UserLevel = int.Parse(dt.Rows[0]["user_level"].ToString());
+            //     user.PreUserLevel = int.Parse(dt.Rows[0]["pre_level"].ToString());
+            //     user.PreLeaderLevel = int.Parse(dt.Rows[0]["leader_level"].ToString());
+            // }
             return user;
         }
 

+ 24 - 11
Util/HaoDa/ProfitAfterNewHelper.cs

@@ -184,6 +184,7 @@ namespace MySystem
             LogHelper.Instance.WriteLog("\n\nTotalAmount:" + TotalAmount + ";", "来客吧分润日志");
             string Month = DateTime.Now.AddMonths(-1).ToString("yyyyMM");
             WebCMSEntities db = new WebCMSEntities();
+            KxsUserModels.WebCMSEntities udb = new KxsUserModels.WebCMSEntities();
             List<UserLevelSet> levels = db.UserLevelSet.ToList();
             List<ProfitResult> result = new List<ProfitResult>();
             ProfitObjects obj = db.ProfitObjects.FirstOrDefault();
@@ -229,7 +230,7 @@ namespace MySystem
                         {
                             user = users[curFloor - 1];
                         }
-                        SubUser selfUser = GetUser(user.UserId, Month) ?? new SubUser();
+                        SubUser selfUser = GetUser(udb, user.UserId, int.Parse(Month)) ?? new SubUser();
                         int UserLevel = GetUserLevel(selfUser); //当前会员等级
                         //判断当前创客是否有直推的激活机具,并且在活动时间内
                         if (curLevel == maxLevel)
@@ -284,23 +285,35 @@ namespace MySystem
                 }
             }
             db.Dispose();
+            udb.Dispose();
             return result;
         }
 
-        public SubUser GetUser(int UserId, string Month)
+        public SubUser GetUser(KxsUserModels.WebCMSEntities db, int UserId, int Month)
         {
             SubUser user = new SubUser();
-            DataTable dt = GetDataTable("select * from kxs_trade_level_log where trade_month=" + Month + " and version=1 and user_id=" + UserId);
-            if (dt.Rows.Count > 0)
+            KxsUserModels.KxsTradeLevelLog log = db.KxsTradeLevelLog.FirstOrDefault(m => m.TradeMonth == Month && m.Version == 1 && m.UserId == UserId);
+            if(log != null)
             {
-                user.Id = int.Parse(dt.Rows[0]["user_id"].ToString());
-                // user.ParentUserId = int.Parse(dt.Rows[0]["ParentUserId"].ToString());
-                user.Level = int.Parse(dt.Rows[0]["level"].ToString());
-                user.ParentNav = dt.Rows[0]["pid_path"].ToString();
-                user.UserLevel = int.Parse(dt.Rows[0]["user_level"].ToString());
-                user.PreUserLevel = int.Parse(dt.Rows[0]["pre_level"].ToString());
-                user.PreLeaderLevel = int.Parse(dt.Rows[0]["leader_level"].ToString());
+                user.Id = log.UserId;
+                user.Level = log.Level;
+                user.ParentNav = log.PidPath;
+                user.UserLevel = log.UserLevel;
+                user.PreUserLevel = log.PreLevel;
+                user.PreLeaderLevel = log.LeaderLevel;;
             }
+            // DataTable dt = GetDataTable("select * from kxs_trade_level_log where trade_month=" + Month + " and version=1 and user_id=" + UserId);
+            // if (dt.Rows.Count > 0)
+            // {
+            //     user.Id = int.Parse(dt.Rows[0]["user_id"].ToString());
+            //     // user.ParentUserId = int.Parse(dt.Rows[0]["ParentUserId"].ToString());
+            //     user.Level = int.Parse(dt.Rows[0]["level"].ToString());
+            //     user.ParentNav = dt.Rows[0]["pid_path"].ToString();
+            //     user.UserLevel = int.Parse(dt.Rows[0]["user_level"].ToString());
+            //     user.PreUserLevel = int.Parse(dt.Rows[0]["pre_level"].ToString());
+            //     user.PreLeaderLevel = int.Parse(dt.Rows[0]["leader_level"].ToString());
+            //     function.WriteLog(Newtonsoft.Json.JsonConvert.SerializeObject(user), "检查666");
+            // }
             return user;
         }
 

+ 21 - 10
Util/HaoDa/ProfitBeforeHelper.cs

@@ -185,6 +185,7 @@ namespace MySystem
             LogHelper.Instance.WriteLog("\n\nTotalAmount:" + TotalAmount + ";", "来客吧分润日志");
             string Month = DateTime.Now.AddMonths(-1).ToString("yyyyMM");
             WebCMSEntities db = new WebCMSEntities();
+            KxsUserModels.WebCMSEntities udb = new KxsUserModels.WebCMSEntities();
             List<UserLevelSet> levels = db.UserLevelSet.ToList();
             List<ProfitResult> result = new List<ProfitResult>();
             ProfitObjects obj = db.ProfitObjects.FirstOrDefault();
@@ -230,7 +231,7 @@ namespace MySystem
                         {
                             user = users[curFloor - 1];
                         }
-                        SubUser selfUser = GetUser(user.UserId, Month) ?? new SubUser();
+                        SubUser selfUser = GetUser(udb, user.UserId, int.Parse(Month)) ?? new SubUser();
                         int UserLevel = GetUserLevel(selfUser); //当前会员等级
                         //判断当前创客是否有直推的激活机具,并且在活动时间内
                         if (curLevel == maxLevel)
@@ -285,22 +286,32 @@ namespace MySystem
                 }
             }
             db.Dispose();
+            udb.Dispose();
             return result;
         }
 
-        public SubUser GetUser(int UserId, string Month)
+        public SubUser GetUser(KxsUserModels.WebCMSEntities db, int UserId, int Month)
         {
             SubUser user = new SubUser();
-            DataTable dt = GetDataTable("select * from kxs_trade_level_log where trade_month=" + Month + " and version=0 and user_id=" + UserId);
-            if (dt.Rows.Count > 0)
+            KxsUserModels.KxsTradeLevelLog log = db.KxsTradeLevelLog.FirstOrDefault(m => m.TradeMonth == Month && m.Version == 1 && m.UserId == UserId);
+            if(log != null)
             {
-                user.Id = int.Parse(dt.Rows[0]["user_id"].ToString());
-                // user.ParentUserId = int.Parse(dt.Rows[0]["ParentUserId"].ToString());
-                user.Level = int.Parse(dt.Rows[0]["level"].ToString());
-                user.ParentNav = dt.Rows[0]["pid_path"].ToString();
-                user.UserLevel = int.Parse(dt.Rows[0]["user_level"].ToString());
-                user.PreUserLevelBefore = int.Parse(dt.Rows[0]["before_pre_level"].ToString());
+                user.Id = log.UserId;
+                user.Level = log.Level;
+                user.ParentNav = log.PidPath;
+                user.UserLevel = log.UserLevel;
+                user.PreUserLevelBefore = log.BeforePreLevel;
             }
+            // DataTable dt = GetDataTable("select * from kxs_trade_level_log where trade_month=" + Month + " and version=0 and user_id=" + UserId);
+            // if (dt.Rows.Count > 0)
+            // {
+            //     user.Id = int.Parse(dt.Rows[0]["user_id"].ToString());
+            //     // user.ParentUserId = int.Parse(dt.Rows[0]["ParentUserId"].ToString());
+            //     user.Level = int.Parse(dt.Rows[0]["level"].ToString());
+            //     user.ParentNav = dt.Rows[0]["pid_path"].ToString();
+            //     user.UserLevel = int.Parse(dt.Rows[0]["user_level"].ToString());
+            //     user.PreUserLevelBefore = int.Parse(dt.Rows[0]["before_pre_level"].ToString());
+            // }
             return user;
         }
 

+ 21 - 10
Util/HaoDa/ProfitBeforeNewHelper.cs

@@ -186,6 +186,7 @@ namespace MySystem
             LogHelper.Instance.WriteLog("\n\nTotalAmount:" + TotalAmount + ";", "来客吧分润日志");
             string Month = DateTime.Now.AddMonths(-1).ToString("yyyyMM");
             WebCMSEntities db = new WebCMSEntities();
+            KxsUserModels.WebCMSEntities udb = new KxsUserModels.WebCMSEntities();
             List<UserLevelSet> levels = db.UserLevelSet.ToList();
             List<ProfitResult> result = new List<ProfitResult>();
             ProfitObjects obj = db.ProfitObjects.FirstOrDefault();
@@ -231,7 +232,7 @@ namespace MySystem
                         {
                             user = users[curFloor - 1];
                         }
-                        SubUser selfUser = GetUser(user.UserId, Month) ?? new SubUser();
+                        SubUser selfUser = GetUser(udb, user.UserId, int.Parse(Month)) ?? new SubUser();
                         int UserLevel = GetUserLevel(selfUser); //当前会员等级
                         //判断当前创客是否有直推的激活机具,并且在活动时间内
                         if (curLevel == maxLevel)
@@ -286,22 +287,32 @@ namespace MySystem
                 }
             }
             db.Dispose();
+            udb.Dispose();
             return result;
         }
 
-        public SubUser GetUser(int UserId, string Month)
+        public SubUser GetUser(KxsUserModels.WebCMSEntities db, int UserId, int Month)
         {
             SubUser user = new SubUser();
-            DataTable dt = GetDataTable("select * from kxs_trade_level_log where trade_month=" + Month + " and version=1 and user_id=" + UserId);
-            if (dt.Rows.Count > 0)
+            KxsUserModels.KxsTradeLevelLog log = db.KxsTradeLevelLog.FirstOrDefault(m => m.TradeMonth == Month && m.Version == 1 && m.UserId == UserId);
+            if(log != null)
             {
-                user.Id = int.Parse(dt.Rows[0]["user_id"].ToString());
-                // user.ParentUserId = int.Parse(dt.Rows[0]["ParentUserId"].ToString());
-                user.Level = int.Parse(dt.Rows[0]["level"].ToString());
-                user.ParentNav = dt.Rows[0]["pid_path"].ToString();
-                user.UserLevel = int.Parse(dt.Rows[0]["user_level"].ToString());
-                user.PreUserLevelBefore = int.Parse(dt.Rows[0]["before_pre_level"].ToString());
+                user.Id = log.UserId;
+                user.Level = log.Level;
+                user.ParentNav = log.PidPath;
+                user.UserLevel = log.UserLevel;
+                user.PreUserLevelBefore = log.BeforePreLevel;
             }
+            // DataTable dt = GetDataTable("select * from kxs_trade_level_log where trade_month=" + Month + " and version=1 and user_id=" + UserId);
+            // if (dt.Rows.Count > 0)
+            // {
+            //     user.Id = int.Parse(dt.Rows[0]["user_id"].ToString());
+            //     // user.ParentUserId = int.Parse(dt.Rows[0]["ParentUserId"].ToString());
+            //     user.Level = int.Parse(dt.Rows[0]["level"].ToString());
+            //     user.ParentNav = dt.Rows[0]["pid_path"].ToString();
+            //     user.UserLevel = int.Parse(dt.Rows[0]["user_level"].ToString());
+            //     user.PreUserLevelBefore = int.Parse(dt.Rows[0]["before_pre_level"].ToString());
+            // }
             return user;
         }
 

Some files were not shown because too many files changed in this diff