|
|
@@ -98,6 +98,58 @@ namespace MySystem.Controllers
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+ public async Task<string> SLSLog()
|
|
|
+ {
|
|
|
+ string logstore = "spserver";
|
|
|
+ Dictionary<string, string> brands = new Dictionary<string, string>();
|
|
|
+ brands.Add("开店宝", "2");
|
|
|
+ brands.Add("乐刷", "4");
|
|
|
+ brands.Add("立刷", "6");
|
|
|
+ brands.Add("立刷微电签", "22");
|
|
|
+ brands.Add("盛付通", "7");
|
|
|
+ brands.Add("海科电签", "8");
|
|
|
+ brands.Add("海科大POS", "9");
|
|
|
+ brands.Add("联动", "10");
|
|
|
+ brands.Add("盒易付电签", "12");
|
|
|
+ brands.Add("联客宝", "15");
|
|
|
+ brands.Add("拉卡拉", "30");
|
|
|
+ brands.Add("联动掌中宝", "34");
|
|
|
+ brands.Add("国通星驿付", "38");
|
|
|
+ brands.Add("金控", "27");
|
|
|
+ foreach(var topic in brands.Keys)
|
|
|
+ {
|
|
|
+ int page = 0;
|
|
|
+ bool op = true;
|
|
|
+ while(op)
|
|
|
+ {
|
|
|
+ int skip = page * 50;
|
|
|
+ IList<IDictionary<string, string>> logs = await SLS.GetLogs(logstore, topic + "交易推送消息", "", DateTimeOffset.Parse("2026-01-23 00:00:00"), skip, 50);
|
|
|
+ if(logs.Count > 0)
|
|
|
+ {
|
|
|
+ foreach(IDictionary<string, string> log in logs)
|
|
|
+ {
|
|
|
+ DateTime time = DateTime.Parse(log["__tag__:datetime"]);
|
|
|
+ if(time < DateTime.Parse("2026-01-23 11:30:00"))
|
|
|
+ {
|
|
|
+ string content = log["content"];
|
|
|
+ if(content.IndexOf("{") > 0)
|
|
|
+ {
|
|
|
+ content = content.Substring(content.IndexOf("{"));
|
|
|
+ }
|
|
|
+ RedisDbconn.Instance.AddList("kxs_trade_list_" + brands[topic], content);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ page += 1;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ op = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return "ok";
|
|
|
+ }
|
|
|
+
|
|
|
public ActionResult SourceDataToDb()
|
|
|
{
|
|
|
WebCMSEntities db = new WebCMSEntities();
|