|
@@ -214,6 +214,38 @@ namespace MySystem
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ public void Start2()
|
|
|
+ {
|
|
|
+ Thread th = new Thread(ready2);
|
|
|
+ th.IsBackground = true;
|
|
|
+ th.Start();
|
|
|
+ }
|
|
|
+
|
|
|
+ private void ready2()
|
|
|
+ {
|
|
|
+ bool op = true;
|
|
|
+ while (op)
|
|
|
+ {
|
|
|
+ string content = RedisDbconn.Instance.RPop<string>("PosCouponPrizeQueue2");
|
|
|
+ if (!string.IsNullOrEmpty(content))
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ dosomething(int.Parse(function.CheckInt(content)));
|
|
|
+ }
|
|
|
+ catch
|
|
|
+ {
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Thread.Sleep(5000);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public void dosomething2(int OrderId)
|
|
|
{
|
|
|
WebCMSEntities db = new WebCMSEntities();
|
|
@@ -300,7 +332,7 @@ namespace MySystem
|
|
|
PrizeFlag = false;
|
|
|
}
|
|
|
}
|
|
|
- if(PrizeFlag && !db.UserAccountRecord.Any(m => m.QueryCount == order.Id && m.ChangeType == 128) && GetPrize == 60)
|
|
|
+ if(PrizeFlag && !db.UserAccountRecord.Any(m => m.QueryCount == order.Id && m.ChangeType == ChangeType))
|
|
|
{
|
|
|
OpAccount(db, order.Id, parentUser.Id, GetPrize, order.BuyCount, ChangeType);
|
|
|
}
|