lcl преди 9 месеца
родител
ревизия
38e00a5e51
променени са 1 файла, в които са добавени 2 реда и са изтрити 86 реда
  1. 2 86
      AppStart/Helper/PosCouponPrize/PosCouponPrizeService.cs

+ 2 - 86
AppStart/Helper/PosCouponPrize/PosCouponPrizeService.cs

@@ -143,7 +143,7 @@ namespace MySystem
                                 //购机奖
                                 if(parentUser.LeaderLevel > 0)
                                 {
-                                    decimal CurBuyPrize = GetBuyPrize(parentUser, order.UserId);
+                                    decimal CurBuyPrize = GetBuyPrize(parentUser, order);
                                     decimal GetPrize = CurBuyPrize - BuyPrize;
                                     Utils.Instance.PrizeRecord(2, order.OrderNo, "发放金额:" + GetPrize);
                                     if(GetPrize > 0 && BuyPrizeFlag < 2)
@@ -177,7 +177,7 @@ namespace MySystem
                                 {
                                     Utils.Instance.PrizeRecord(2, order.OrderNo, "满足条件,发放购机奖");
                                     //购机奖
-                                    decimal CurBuyPrize = GetBuyPrize(parentUser, order.UserId);
+                                    decimal CurBuyPrize = GetBuyPrize(parentUser, order);
                                     decimal GetPrize = CurBuyPrize - BuyPrize;
                                     Utils.Instance.PrizeRecord(2, order.OrderNo, "发放金额:" + GetPrize);
                                     if(GetPrize > 0)
@@ -301,90 +301,6 @@ namespace MySystem
                                     RedisDbconn.Instance.AddList("OperateAmountRecordServiceQueue", item);
                                 }
                             }
-<<<<<<< HEAD
-=======
-
-                            if(!BackAccountFlag)
-                            {
-                                BackAccountFlag = true;
-                                //扣减备用金
-                                int ReserveRecordId = OpReserve(db, order.Id, parentUser.Id, GetWithdrawMoney(parentUser) * order.BuyCount, 2, order.UserId, "购机奖励");
-                                //返回到余额
-                                OpLeaderAccount(db, order, parentUser.Id, GetWithdrawMoney(parentUser), order.BuyCount, ReserveRecordId);
-                            }
-
-                            //给券打大盟主标记
-                            Utils.Instance.PrizeRecord(2, order.OrderNo, "条件:创客是盟主;创客盟主等级:" + parentUser.LeaderLevel + "");
-                            Utils.Instance.PrizeRecord(2, order.OrderNo, "条件:盟主储备金是否充足;");
-                            if(parentUser.LeaderLevel == 1 && CheckLeaderReserve(db, order.BuyCount, parentUser.Id) && !BigLeaderFlag)
-                            {
-                                Utils.Instance.PrizeRecord(2, order.OrderNo, "满足小盟主条件,开始检查大盟主关联的额度");
-                                int LeaderId = CheckPosCouponLeaderFlag(db, parentUser.Id, order.BuyCount, codes);
-                                if(LeaderId > 0)
-                                {
-                                    BigLeaderFlag = true;
-                                    Utils.Instance.PrizeRecord(2, order.OrderNo, "满足条件,大盟主标记打给" + LeaderId);
-                                }
-                            }
-                            else if(parentUser.LeaderLevel == 2 && !BigLeaderFlag)
-                            {
-                                Utils.Instance.PrizeRecord(2, order.OrderNo, "满足大盟主条件,大盟主标记打给" + parentUser.Id + ",对应机具券:" + order.SnNos);
-                                BigLeaderFlag = true;
-                                if(!string.IsNullOrEmpty(order.SnNos))
-                                {
-                                    List<int> couponIds = db.PosCoupons.Where(m => codes.Contains(m.ExchangeCode)).OrderBy(m => m.Id).Take(CouponCount).ToList().Select(m => m.Id).ToList();
-                                    Utils.Instance.PrizeRecord(2, order.OrderNo, "开始打标记,数量:" + couponIds.Count);
-                                    SetPosCouponLeaderFlag(db, parentUser.Id, order.BuyCount, couponIds);
-                                    Utils.Instance.PrizeRecord(2, order.OrderNo, "结束打标记");
-                                }
-                            }
-                        }
-                        else if(parentUser.OperateLevel > 0 && CheckOpReserve(opdb, order.BuyCount, parentUser.Id) && BuyPrizeFlag < 2)
-                        {
-                            Utils.Instance.PrizeRecord(2, order.OrderNo, "满足条件,发放购机奖");
-                            //购机奖
-                            decimal CurBuyPrize = GetBuyPrize(parentUser, order);
-                            decimal GetPrize = CurBuyPrize - BuyPrize;
-                            Utils.Instance.PrizeRecord(2, order.OrderNo, "发放金额:" + GetPrize);
-                            if(GetPrize > 0)
-                            {
-                                int ChangeType = 120;
-                                if(parentUser.OperateLevel > 1)
-                                {
-                                    ChangeType = 128;
-                                }
-                                OpAccount(db, order.Id, parentUser.Id, GetPrize, order.BuyCount, ChangeType);
-                                BuyPrize = CurBuyPrize;
-                                if(GetPrize == 160) BuyPrizeFlag = 2;
-                                else if(GetPrize == 60) BuyPrizeFlag = 2;
-                                else BuyPrizeFlag = 1;
-                            }
-                            if(parentUser.OperateLevel == 2 && CurBuyPrize == 100) BuyPrizeFlag = 2; 
-
-                            if(!BackAccountFlag)
-                            {
-                                BackAccountFlag = true;
-                                decimal GetAmount = GetWithdrawMoney(parentUser) * order.BuyCount;
-                                //扣减备用金
-                                // OperateAmountChange(opdb, parentUser.Id, GetAmount, 2, 1, "商城购机", true, order.Id);
-                                // //返回到余额
-                                // OperateAmountChange(opdb, parentUser.Id, GetAmount, 1, 2, "商城购机", true, order.Id);
-
-                                OpAmountItem item = new OpAmountItem()
-                                {
-                                    UserId = parentUser.Id,
-                                    OperateType = 0,
-                                    ChangeType = 5,
-                                    Remark = "商城购机",
-                                    UseAmount = GetAmount,
-                                    UseValidForGetAmount = GetAmount,
-                                    UseTotalAmt = GetAmount,
-                                    DataType = 1,
-                                    DataId = order.Id,
-                                };
-                                RedisDbconn.Instance.AddList("OperateAmountRecordServiceQueue", item);
-                            }
->>>>>>> feat-lcl-训练营奖励拦截记录
                         }
                     }
                 }