Explorar el Código

天谕接口时间戳参数改为毫秒

lcl hace 1 año
padre
commit
914fb41fe8
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. 1 1
      AppStart/Helper/TianYuVoiceHelper.cs
  2. 1 1
      Controllers/HomeController.cs

+ 1 - 1
AppStart/Helper/TianYuVoiceHelper.cs

@@ -58,7 +58,7 @@ namespace MySystem
             SortedList<string, string> data = new SortedList<string, string>();
             data.Add("accessKeyId", accesskeyld); //由本公司统一提供给客户的唯一识别码(同accessKeyId)
             data.Add("requestId", jsonObj["OrderNo"].ToString()); //请求标识,用于唯一标识当前请求
-            data.Add("timestamp", function.ConvertDateTimeInt(DateTime.Now).ToString()); //请求时间戳,格式如:1593532800000
+            data.Add("timestamp", function.GetCurTimestamp().ToString()); //请求时间戳,格式如:1593532800000
             data.Add("deviceId", jsonObj["DeviceId"].ToString()); //设备编号
             data.Add("content", "来客吧收款" + jsonObj["Amount"].ToString() + "元"); //(终端直接播报内容,支持 tts 设备可以直接播报汉字语音,不支持 tts 的设备要分开传 requestData、payType)
             // data.Add("requestData", "0.01"); //播报金额((只送金额,单位:元)

+ 1 - 1
Controllers/HomeController.cs

@@ -211,7 +211,7 @@ namespace MySystem.Controllers
             // return WeChatFunctionForHD.Instance.AesGcmDecrypt("certificate", "fdc941b6d56c", content);
             // return "ok";
 
-            return TianYuVoiceHelper.Instance.doSomething("{\"OrderNo\":\"" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + "\",\"DeviceId\":\"010857203321\",\"Amount\":\"100\"}");
+            return TianYuVoiceHelper.Instance.doSomething("{\"OrderNo\":\"" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + "\",\"DeviceId\":\"010859416327\",\"Amount\":\"100\"}");
         }
     
     }