1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using MySystem.PxcModels;
- using Library;
- using LitJson;
- namespace MySystem
- {
- public class SycnSpService
- {
- public readonly static SycnSpService Instance = new SycnSpService();
- private SycnSpService()
- { }
- public void Start(JobMqMsg jobInfo)
- {
- try
- {
- string OrderString = jobInfo.OrderString;
- if (OrderString.StartsWith("Sp:") && OrderString.EndsWith(":SpServer"))
- {
- string Kind = OrderString.Split(':')[1];
- dosomething(Kind);
- // jobInfo.Status = 1;
- // jobInfo.Msg = "执行完成";
- // RabbitMQClient.Instance.SendMsg(Newtonsoft.Json.JsonConvert.SerializeObject(jobInfo), "SycnSpServerBack");
- }
- }
- catch (Exception ex)
- {
- function.WriteLog(DateTime.Now.ToString() + "\r\n" + ex.ToString(), "同步SP数据到MAIN异常");
- }
- }
- public void dosomething(string Kind)
- {
- // if (Kind == "bind")
- // {
- // SycnSpBindService.Instance.Start();
- // }
- // else if (Kind == "active")
- // {
- // SycnSpActiveService.Instance.Start();
- // }
- // else if (Kind == "trade")
- // {
- // SycnSpTradeService.Instance.Start();
- // }
- // else if (Kind == "merchant")
- // {
- // SycnSpMerchantService.Instance.Start();
- // }
- }
- }
- }
|