|
@@ -33,7 +33,6 @@ namespace MySystem
|
|
|
try
|
|
|
{
|
|
|
var Id = int.Parse(content);
|
|
|
- dosomething(Id);
|
|
|
WebCMSEntities db = new WebCMSEntities();
|
|
|
var queryList = db.LeaderReserveRecord.FirstOrDefault(m => m.Id == Id) ?? new LeaderReserveRecord();
|
|
|
|
|
@@ -77,6 +76,8 @@ namespace MySystem
|
|
|
db.SaveChanges();
|
|
|
}
|
|
|
db.SaveChanges();
|
|
|
+
|
|
|
+ dosomething(Id);
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
@@ -117,8 +118,17 @@ namespace MySystem
|
|
|
{
|
|
|
int num = Convert.ToInt32(ApplyList[i]["Num"].ToString());
|
|
|
int Kind = Convert.ToInt32(ApplyList[i]["Type"].ToString());
|
|
|
- List<int> couponIds = db.PosCoupons.Where(m => m.IsLock == 0 && m.IsUse == 0 && m.UserId == 0 && m.QueryCount == Kind).OrderBy(m => m.Id).Take(num).ToList().Select(m => m.Id).ToList();
|
|
|
- int result = PosCouponPrizeService.Instance.SetPosCouponLeaderFlag(db, parentUser.Id, num / 3, couponIds);
|
|
|
+ int Step = 0;
|
|
|
+ if(Kind == 1)
|
|
|
+ {
|
|
|
+ Step = 3;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Step = 2;
|
|
|
+ }
|
|
|
+ List<int> couponIds = db.PosCoupons.Where(m => m.IsLock == 0 && m.IsUse == 0 && m.UserId == query.UserId && m.QueryCount == Kind).OrderBy(m => m.Id).Take(num).ToList().Select(m => m.Id).ToList();
|
|
|
+ int result = PosCouponPrizeService.Instance.SetPosCouponLeaderFlag(db, parentUser.Id, num / Step, couponIds);
|
|
|
if(result > 0) BigLeaderFlag = true;
|
|
|
}
|
|
|
}
|
|
@@ -130,14 +140,21 @@ namespace MySystem
|
|
|
{
|
|
|
int num = Convert.ToInt32(ApplyList[i]["Num"].ToString());
|
|
|
int Kind = Convert.ToInt32(ApplyList[i]["Type"].ToString());
|
|
|
- groupCount += num / 3;
|
|
|
+ if(Kind == 1)
|
|
|
+ {
|
|
|
+ groupCount += num / 3;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ groupCount += num / 2;
|
|
|
+ }
|
|
|
}
|
|
|
if(PosCouponPrizeService.Instance.CheckOpReserve(opdb, groupCount, parentUser.Id))
|
|
|
{
|
|
|
//购机奖
|
|
|
decimal CurBuyPrize = GetBuyPrize(parentUser);
|
|
|
decimal GetPrize = CurBuyPrize - BuyPrize;
|
|
|
- if(GetPrize > 0) PosCouponPrizeService.Instance.OpAccount(db, 0, parentUser.Id, GetPrize, groupCount, 120);
|
|
|
+ if(GetPrize > 0) PosCouponPrizeService.Instance.OpAccount(db, 0, parentUser.Id, GetPrize, groupCount, 128);
|
|
|
BuyPrize = CurBuyPrize;
|
|
|
}
|
|
|
}
|