|
@@ -37,6 +37,8 @@ namespace MySystem
|
|
|
var queryList = db.LeaderReserveRecord.FirstOrDefault(m => m.Id == Id) ?? new LeaderReserveRecord();
|
|
|
|
|
|
List<int> couponIds = new List<int>();
|
|
|
+ List<string> codes = new List<string>();
|
|
|
+ int count = 0;
|
|
|
|
|
|
JsonData ApplyList = JsonMapper.ToObject(queryList.SeoTitle);
|
|
|
for (int i = 0; i < ApplyList.Count; i++)
|
|
@@ -58,7 +60,9 @@ namespace MySystem
|
|
|
SnNo = posCoupon.ExchangeCode,
|
|
|
});
|
|
|
couponIds.Add(item.Id);
|
|
|
+ codes.Add(item.ExchangeCode);
|
|
|
}
|
|
|
+ count += couponIds.Count / 3;
|
|
|
}
|
|
|
//大机
|
|
|
if (type == 2)
|
|
@@ -75,12 +79,19 @@ namespace MySystem
|
|
|
SnNo = posCoupon.ExchangeCode,
|
|
|
});
|
|
|
couponIds.Add(items.Id);
|
|
|
+ codes.Add(items.ExchangeCode);
|
|
|
}
|
|
|
+ count += couponIds.Count / 2;
|
|
|
}
|
|
|
db.SaveChanges();
|
|
|
}
|
|
|
db.SaveChanges();
|
|
|
|
|
|
+ bool BigLeaderFlag = PosCouponPrizeService.Instance.CheckPosCouponLeaderFlag(db, queryList.UserId, count, codes);
|
|
|
+ if(BigLeaderFlag)
|
|
|
+ {
|
|
|
+ couponIds.Clear();
|
|
|
+ }
|
|
|
dosomething(Id, couponIds);
|
|
|
}
|
|
|
catch (Exception ex)
|