Exemple #1
0
        /// <summary>
        /// 注册获取等级
        /// </summary>
        /// <param name="upUser"></param>
        /// <returns></returns>
        public DAO.MemberLevel GetLevel(int uid, int upUser)
        {
            ExpRecordBLL expBll = new ExpRecordBLL();

            DAO.ExpRecord  expModel = new DAO.ExpRecord();
            MemberLevelBLL mleve    = new MemberLevelBLL();

            DAO.MemberLevel lmodel;
            if (upUser == -1)//独立注册的新会员可自动升级为二星会员 且自主购货累计双倍积分。
            {
                lmodel = mleve.GetLevelBySelf();
                //添加积分记录
                expModel.Source = "独立注册";
            }
            else if (upUser == 0)
            {
                lmodel = mleve.GetLevelBySelf();
                //添加积分记录
                expModel.Source = "微信注册";
            }
            else
            { //推荐注册 一星会员
                lmodel = mleve.GetLevelByUser();
                //添加积分记录
                expModel.Source = "邀请码注册";
            }
            expModel.Uid      = uid;
            expModel.Exp      = lmodel.MinIntegral;
            expModel.Datetime = DateTime.Now;
            expModel.Status   = 1;
            expBll.AddRecord(expModel);
            return(lmodel);
        }
Exemple #2
0
 /// <summary>
 /// 给上级用户积分
 /// </summary>
 public void GiveUpUserInt(int cuid, int upUser)
 {
     if (upUser != -1)
     {
         ExpRecordBLL  expBll   = new ExpRecordBLL();
         DAO.ExpRecord expModel = new DAO.ExpRecord();
         expModel.Uid      = upUser;
         expModel.Source   = "发展注册";
         expModel.LowerUid = cuid;
         expModel.Exp      = int.Parse(ConfigurationApp.TJJF);
         expModel.Datetime = DateTime.Now;
         expModel.Status   = 1;
         expBll.AddRecord(expModel);
     }
 }