|
@@ -36,6 +36,8 @@ namespace MySystem
|
|
|
WebCMSEntities db = new WebCMSEntities();
|
|
|
var queryList = db.LeaderReserveRecord.FirstOrDefault(m => m.Id == Id) ?? new LeaderReserveRecord();
|
|
|
|
|
|
+ List<int> couponIds = new List<int>();
|
|
|
+
|
|
|
JsonData ApplyList = JsonMapper.ToObject(queryList.SeoTitle);
|
|
|
for (int i = 0; i < ApplyList.Count; i++)
|
|
|
{
|
|
@@ -55,6 +57,7 @@ namespace MySystem
|
|
|
QueryCount = Id,
|
|
|
SnNo = posCoupon.ExchangeCode,
|
|
|
});
|
|
|
+ couponIds.Add(item.Id);
|
|
|
}
|
|
|
}
|
|
|
//大机
|
|
@@ -71,13 +74,14 @@ namespace MySystem
|
|
|
QueryCount = Id,
|
|
|
SnNo = posCoupon.ExchangeCode,
|
|
|
});
|
|
|
+ couponIds.Add(items.Id);
|
|
|
}
|
|
|
}
|
|
|
db.SaveChanges();
|
|
|
}
|
|
|
db.SaveChanges();
|
|
|
|
|
|
- dosomething(Id);
|
|
|
+ dosomething(Id, couponIds);
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
@@ -91,7 +95,7 @@ namespace MySystem
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public void dosomething(int Id)
|
|
|
+ public void dosomething(int Id, List<int> couponIds)
|
|
|
{
|
|
|
WebCMSEntities db = new WebCMSEntities();
|
|
|
OpModels.WebCMSEntities opdb = new OpModels.WebCMSEntities();
|
|
@@ -127,7 +131,6 @@ namespace MySystem
|
|
|
{
|
|
|
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;
|
|
|
}
|