|
@@ -5,6 +5,7 @@ using MySystem.SpModels;
|
|
|
using Library;
|
|
|
using LitJson;
|
|
|
using System.Threading;
|
|
|
+using MySystem.MpMainModels;
|
|
|
|
|
|
namespace MySystem
|
|
|
{
|
|
@@ -215,26 +216,7 @@ namespace MySystem
|
|
|
db.SaveChanges();
|
|
|
|
|
|
//检查交易状态,并发奖励
|
|
|
- PxcModels.WifiTradeRecord trade = db.WifiTradeRecord.FirstOrDefault(m => m.SnNo == pos.PosSn && m.Status == 0);
|
|
|
- if (trade != null)
|
|
|
- {
|
|
|
- trade.Status = 1;
|
|
|
- db.SaveChanges();
|
|
|
- Prize = trade.TradeAmount * 0.15M;
|
|
|
- StatService.Instance.doActiveReward(db, add, pos, pos.BuyUserId, user.ParentNav, TopUserId, Prize);
|
|
|
- if (pos.CardType < 100)
|
|
|
- {
|
|
|
- RedisDbconn.Instance.AddList("OpenRewardQueue", pos.Id.ToString());
|
|
|
- }
|
|
|
- if (pos.LeaderUserId > 0 && db.Leaders.Any(m => m.Id == pos.LeaderUserId && m.ExpiredDate > DateTime.Now) && pos.CardType < 100)
|
|
|
- {
|
|
|
- RedisDbconn.Instance.AddList("LeaderPrizeQueue", pos.Id);
|
|
|
- }
|
|
|
- if (pos.CardType < 100)
|
|
|
- {
|
|
|
- RedisDbconn.Instance.AddList("OperatePrizeQueue", pos.Id);
|
|
|
- }
|
|
|
- }
|
|
|
+ WifiSendPrize(db, pos, add);
|
|
|
}
|
|
|
|
|
|
Merchants edit = spdb.Merchants.FirstOrDefault(m => m.Id == Mer.Id);
|
|
@@ -265,5 +247,29 @@ namespace MySystem
|
|
|
Thread.Sleep(1000);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ public void WifiSendPrize(PxcModels.WebCMSEntities db, PxcModels.PosMachinesTwo pos, PxcModels.PosMerchantInfo add)
|
|
|
+ {
|
|
|
+ PxcModels.WifiTradeRecord trade = db.WifiTradeRecord.FirstOrDefault(m => m.SnNo == pos.PosSn && m.Status == 0);
|
|
|
+ if (trade != null)
|
|
|
+ {
|
|
|
+ trade.Status = 1;
|
|
|
+ db.SaveChanges();
|
|
|
+ decimal Prize = trade.TradeAmount * 0.15M;
|
|
|
+ StatService.Instance.doActiveReward(db, add, pos, pos.BuyUserId, "", 1, Prize);
|
|
|
+ if (pos.CardType < 100)
|
|
|
+ {
|
|
|
+ RedisDbconn.Instance.AddList("OpenRewardQueue", pos.Id.ToString());
|
|
|
+ }
|
|
|
+ if (pos.LeaderUserId > 0 && db.Leaders.Any(m => m.Id == pos.LeaderUserId && m.ExpiredDate > DateTime.Now) && pos.CardType < 100)
|
|
|
+ {
|
|
|
+ RedisDbconn.Instance.AddList("LeaderPrizeQueue", pos.Id);
|
|
|
+ }
|
|
|
+ if (pos.CardType < 100)
|
|
|
+ {
|
|
|
+ RedisDbconn.Instance.AddList("OperatePrizeQueue", pos.Id);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|