|
@@ -189,10 +189,10 @@ namespace MySystem
|
|
|
ProfitObjects obj = db.ProfitObjects.FirstOrDefault();
|
|
|
if (obj.Status == 1) //判断分润是否开启
|
|
|
{
|
|
|
- int maxLevel = obj.MaxLevel; //最大等级
|
|
|
+ int maxLevel = 5; //最大等级
|
|
|
int maxFloor = obj.MaxFloor; //最大层级
|
|
|
decimal diffLevelProfit = 0; //等级级差
|
|
|
- ProfitObjectLevels maxlevel = db.ProfitObjectLevels.FirstOrDefault(m => m.LevelNumber == 9) ?? new ProfitObjectLevels(); //获取最高等级参数
|
|
|
+ ProfitObjectLevels maxlevel = db.ProfitObjectLevels.FirstOrDefault(m => m.LevelNumber == 5 && m.Version == 1) ?? new ProfitObjectLevels(); //获取最高等级参数
|
|
|
decimal maxPercent = IsActive ? maxlevel.DebitPercents : maxlevel.Percents;
|
|
|
LogHelper.Instance.WriteLog("maxPercent:" + maxPercent + ";", "来客吧分润日志");
|
|
|
decimal maxLevelProfit = TotalAmount * maxPercent;
|
|
@@ -290,11 +290,11 @@ namespace MySystem
|
|
|
public SubUser GetUser(int UserId, string Month)
|
|
|
{
|
|
|
SubUser user = new SubUser();
|
|
|
- DataTable dt = GetDataTable("select * from kxs_trade_level_log where trade_month=" + Month + " where user_id=" + UserId);
|
|
|
+ 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.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());
|