|
|
@@ -42,13 +42,38 @@ namespace MySystem
|
|
|
foreach (ActivateRecord act in acts.ToList())
|
|
|
{
|
|
|
PosPushDataNewHelper.Deposit(act);
|
|
|
- if(act.ProductType == "36" && decimal.Parse(function.CheckNum(act.Field3)) > 0)
|
|
|
+ decimal PrizeAmt = decimal.Parse(function.CheckNum(act.Field3));
|
|
|
+ if(act.ProductType == "36" && PrizeAmt > 0)
|
|
|
{
|
|
|
- JavaProductModels.KxsMachine pos = javaprodb.KxsMachine.FirstOrDefault(m => m.PosSn == act.SnNo && m.UserId > 0);
|
|
|
- if(pos != null)
|
|
|
+ string PrizeKind = act.SeoKeyword;
|
|
|
+ if ((PrizeKind == "830_21" || PrizeKind == "830_22" || PrizeKind == "833_01" || PrizeKind == "833_02" || PrizeKind == "995_21" || PrizeKind == "995_22" || PrizeKind == "995") && PrizeAmt > 0)
|
|
|
{
|
|
|
- RedisDbconn.Instance.AddList("HaoDaPrizeDataQueue", "{\"brand_id\":36,\"ext_field\":\"" + act.Field3 + "\",\"pos_sn\":\"" + act.SnNo + "\",\"user_id\":" + pos.UserId + "}");
|
|
|
+ JavaProductModels.KxsMachine pos = javaprodb.KxsMachine.FirstOrDefault(m => m.PosSn == act.SnNo && m.UserId > 0);
|
|
|
+ if(pos != null)
|
|
|
+ {
|
|
|
+ Dictionary<string, object> prizeData = new Dictionary<string, object>();
|
|
|
+ prizeData.Add("brand_id", 36);
|
|
|
+ prizeData.Add("ext_field", PrizeKind);
|
|
|
+ prizeData.Add("pos_sn", act.SnNo);
|
|
|
+ prizeData.Add("user_id", pos.UserId);
|
|
|
+ prizeData.Add("prize", PrizeAmt);
|
|
|
+ string req = Newtonsoft.Json.JsonConvert.SerializeObject(prizeData);
|
|
|
+ if(PrizeKind == "833_01" || PrizeKind == "833_02")
|
|
|
+ {
|
|
|
+ string ids = PrizeKind == "833_01" ? "81" : "82";
|
|
|
+ function.GetWebRequest("http://logic-executor-api.kexiaoshuang.com/noauth/prize/pushbyone?n=QUEUE_KXS_HAODA_PRIZE_CONFIG_DIVISION&m=" + req + "&ids=" + ids + ",83");
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ RedisDbconn.Instance.AddList("HaoDaPrizeDataQueue", "{\"brand_id\":36,\"ext_field\":\"" + act.Field3 + "\",\"pos_sn\":\"" + act.SnNo + "\",\"user_id\":" + pos.UserId + "}");
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
+ // JavaProductModels.KxsMachine pos = javaprodb.KxsMachine.FirstOrDefault(m => m.PosSn == act.SnNo && m.UserId > 0);
|
|
|
+ // if(pos != null)
|
|
|
+ // {
|
|
|
+ // RedisDbconn.Instance.AddList("HaoDaPrizeDataQueue", "{\"brand_id\":36,\"ext_field\":\"" + act.Field3 + "\",\"pos_sn\":\"" + act.SnNo + "\",\"user_id\":" + pos.UserId + "}");
|
|
|
+ // }
|
|
|
}
|
|
|
|
|
|
ActivateRecord edit = spdb.ActivateRecord.FirstOrDefault(m => m.Id == act.Id);
|