using System; using System.Collections.Generic; using Library; using LitJson; using System.Linq; using System.Data; using System.Threading; using MySystem.PxcModels; namespace MySystem { public class PrizeSetHelper { public readonly static PrizeSetHelper Instance = new PrizeSetHelper(); private PrizeSetHelper() { } public static void Do(string type, string no) { try { string field = "PosSn"; if(type == "3" || type == "7") field = "OrderNo"; Dictionary data = new Dictionary(); data.Add("prize_tag", type); data.Add("content", "{\"" + field + "\":\"" + no + "\"}"); RedisDbconn.Instance.AddList("PrizeSendQueue", Newtonsoft.Json.JsonConvert.SerializeObject(data)); } catch(Exception ex) { function.WriteLog(DateTime.Now.ToString() + "\n" + ex.ToString(), "发送MQ奖励数据异常"); } } } }