|
@@ -355,6 +355,13 @@ namespace MySystem
|
|
|
|
|
|
public void SendMqOrder(Orders order)
|
|
|
{
|
|
|
+ string chk = RedisDbconn.Instance.Get<string>("KxsOrderQueueChk:" + order.Id + ":" + order.Status);
|
|
|
+ if(!string.IsNullOrEmpty(chk))
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ RedisDbconn.Instance.Set("KxsOrderQueueChk:" + order.Id + ":" + order.Status, DateTime.Now.ToString());
|
|
|
+ RedisDbconn.Instance.SetExpire("KxsOrderQueueChk:" + order.Id + ":" + order.Status, 7200);
|
|
|
string data = Newtonsoft.Json.JsonConvert.SerializeObject(new MqOrder()
|
|
|
{
|
|
|
id = order.Id,
|
|
@@ -391,6 +398,13 @@ namespace MySystem
|
|
|
|
|
|
public void SendActData(PosMachinesTwo pos)
|
|
|
{
|
|
|
+ string chk = RedisDbconn.Instance.Get<string>("KxsActQueueChk:" + pos.PosSn);
|
|
|
+ if(!string.IsNullOrEmpty(chk))
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ RedisDbconn.Instance.Set("KxsActQueueChk:" + pos.PosSn, DateTime.Now.ToString());
|
|
|
+ RedisDbconn.Instance.SetExpire("KxsActQueueChk:" + pos.PosSn, 7200);
|
|
|
int actType = pos.BrandId != 14 ? 1 : 2;
|
|
|
string data = "{";
|
|
|
data += "\"userId\":\"" + pos.BuyUserId + "\",";
|