소스 검색

订单推送notice_id去订单号

lcl 1 개월 전
부모
커밋
eb1c29ef3a
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      Util/Queue/PushHelper.cs

+ 6 - 1
Util/Queue/PushHelper.cs

@@ -179,13 +179,18 @@ namespace MySystem
                         string PushDataEncrypt = "";
                         if(EncryptMode == 1)
                         {
+                            string noticeId = Guid.NewGuid().ToString();
+                            if(obj.ContainsKey("order_id"))
+                            {
+                                noticeId = obj["order_id"];
+                            }
                             PushData = Newtonsoft.Json.JsonConvert.SerializeObject(obj);
                             LogHelper.Instance.WriteLog("原始数据:" + PushData, "推送数据日志");
                             string content = EncryptHelper.Encrypt1(obj, AesSecret);
                             LogHelper.Instance.WriteLog("加密数据:" + content, "推送数据日志");
                             obj = new SortedList<string, string>();
                             obj.Add("type", Title);
-                            obj.Add("notice_id", Guid.NewGuid().ToString());
+                            obj.Add("notice_id", noticeId);
                             obj.Add("timestamp", DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8));
                             obj.Add("content", content);
                             string requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(obj);