|
|
@@ -16,7 +16,7 @@ public class TestHelper
|
|
|
|
|
|
public void Start()
|
|
|
{
|
|
|
- Thread th = new Thread(setLdFee);
|
|
|
+ Thread th = new Thread(HaoDaPrizeNew);
|
|
|
th.IsBackground = true;
|
|
|
th.Start();
|
|
|
}
|
|
|
@@ -225,4 +225,33 @@ public class TestHelper
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ private void HaoDaPrizeNew()
|
|
|
+ {
|
|
|
+ List<string> bonusTypes = new List<string>();
|
|
|
+ bonusTypes.Add("830_21");
|
|
|
+ bonusTypes.Add("830_22");
|
|
|
+ bonusTypes.Add("995_21");
|
|
|
+ bonusTypes.Add("995_22");
|
|
|
+ MySystem.MpMainModels2.WebCMSEntities db = new MySystem.MpMainModels2.WebCMSEntities();
|
|
|
+ MySystem.JavaProductModels.WebCMSEntities javauserdb = new MySystem.JavaProductModels.WebCMSEntities();
|
|
|
+ List<MySystem.MpMainModels2.HdTouchRewardTmp> items = db.HdTouchRewardTmp.Where(m => bonusTypes.Contains(m.BonusType)).ToList();
|
|
|
+ foreach(MySystem.MpMainModels2.HdTouchRewardTmp item in items)
|
|
|
+ {
|
|
|
+ MySystem.JavaProductModels.KxsMachine pos = javauserdb.KxsMachine.FirstOrDefault(m => m.PosSn == item.SnNo && m.UserId > 0);
|
|
|
+ if(pos != null)
|
|
|
+ {
|
|
|
+ Dictionary<string, object> prizeData = new Dictionary<string, object>();
|
|
|
+ prizeData.Add("brand_id", 29);
|
|
|
+ prizeData.Add("ext_field", item.BonusType);
|
|
|
+ prizeData.Add("pos_sn", item.SnNo);
|
|
|
+ prizeData.Add("user_id", pos.UserId);
|
|
|
+ prizeData.Add("prize", item.Reward.ToString());
|
|
|
+ // RedisDbconn.Instance.AddList("HaoDaPrizeDataQueue", Newtonsoft.Json.JsonConvert.SerializeObject(prizeData));
|
|
|
+ function.WriteLog(Newtonsoft.Json.JsonConvert.SerializeObject(prizeData), "补好哒新奖励");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ db.Dispose();
|
|
|
+ javauserdb.Dispose();
|
|
|
+ }
|
|
|
}
|