| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using Library;
- using MySystem.Models.Main;
- namespace MySystem
- {
- public class Utils
- {
- public readonly static Utils Instance = new Utils();
- private Utils()
- { }
- #region 推送激活数据信息
- public void SendActData(MerchantInfo pos, int actType = 3)
- {
- // if(pos.BrandId == 1) return;
- // string data = "{";
- // data += "\"userId\":\"" + pos.UserId + "\",";
- // data += "\"brandId\":\"2\",";
- // data += "\"actTime\":\"" + DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss") + "\",";
- // data += "\"bindTime\":\"" + DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss") + "\",";
- // data += "\"sn\":\"\",";
- // data += "\"actType\":\"" + actType + "\"";
- // data += "}";
- // Utils.WriteLog(DateTime.Now.ToString() + "\n" + data, "推送激活数据信息MQ日志");
- // RedisDbconn.Instance.AddList("KxsActQueue", data);
- }
- #endregion
- #region 打控制台日志
- public static void WriteLog(string msg, string filename = "message")
- {
- Console.WriteLine(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff") + "--" + filename + "--" + msg);
- }
- #endregion
-
- }
- }
|