1234567891011121314151617181920212223242526272829303132333435 |
- 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<string, string> data = new Dictionary<string, string>();
- 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奖励数据异常");
- }
- }
- }
- }
|