工单 增加 接收服务端推送的新工单,支持 推送增加消息
This commit is contained in:
1 parent
f0f1f1ed9e
commit
6ed2cede16
11 files changed
+429
-205
No files matched your search
@@ -4,6 +4,7 @@ using Newtonsoft.Json;
|
||||
using OrderSupportTicket.Models;
|
||||
using OrderSupportTicket.Models.Api;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
@@ -137,6 +138,7 @@ public sealed class EventSourceTicketRealtimeService
|
||||
TicketRealtimeNotification notification;
|
||||
try
|
||||
{
|
||||
Debug.WriteLine(data);
|
||||
notification = JsonConvert.DeserializeObject<TicketRealtimeNotification>(data, TicketApiService.JsonSettings);
|
||||
}
|
||||
catch (JsonException)
|
||||
|
||||
@@ -5,6 +5,7 @@ using OrderSupportTicket.Models;
|
||||
using OrderSupportTicket.Models.Api;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
@@ -128,7 +129,7 @@ public sealed class TicketApiService
|
||||
Limit = limit,
|
||||
Before = string.IsNullOrWhiteSpace(before) ? null : before
|
||||
};
|
||||
|
||||
Debug.WriteLine($"{wechatOrderId}加载所有对话");
|
||||
var path = ApiRoot
|
||||
+ "/messages";
|
||||
return await PostAsync<WorkOrderMessagesResponse>(path, request);
|
||||
@@ -456,7 +457,7 @@ public sealed class TicketApiService
|
||||
EnsureSuccessBody(html);
|
||||
try
|
||||
{
|
||||
var result = JsonConvert.DeserializeObject<T>(html, JsonSettings);
|
||||
var result = JsonConvert.DeserializeObject<T>(html, JsonSettings);
|
||||
if (result == null)
|
||||
throw new JsonSerializationException("接口响应为空。");
|
||||
return result;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using OrderSupportTicket.Models;
|
||||
using OrderSupportTicket.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -109,6 +109,10 @@ public sealed class TicketRealtimeMonitor : IDisposable
|
||||
return;
|
||||
}
|
||||
|
||||
if (!string.Equals(_optionsFingerprint, fingerprint, StringComparison.Ordinal))
|
||||
{
|
||||
_seenEventIds.Clear();
|
||||
}
|
||||
_options = options;
|
||||
_optionsFingerprint = fingerprint;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user