| | |
| | | { |
| | | try |
| | | { |
| | | Console.WriteLine($"接收到推送,,,,.{Newtonsoft.Json.JsonConvert.SerializeObject(jpushMessageInfo).ToString()}"); |
| | | //Console.WriteLine($"接收到推送,,,,.{Newtonsoft.Json.JsonConvert.SerializeObject(jpushMessageInfo).ToString()}"); |
| | | |
| | | //Extras为空不处理 |
| | | if (string.IsNullOrEmpty(jpushMessageInfo.Extras)) return; |
| | |
| | | |
| | | //字段兼容问题,只能直接取值了 |
| | | var json = Newtonsoft.Json.Linq.JObject.Parse(jpushMessageInfo.expantContent); |
| | | try |
| | | { |
| | | //var pushHomeId = json["homeId"]; |
| | | //if (pushHomeId == null || string.IsNullOrEmpty(pushHomeId.ToString())){ |
| | | // Console.WriteLine("homeId is null"); |
| | | // return; |
| | | //} |
| | | var pushTime = json["pushTime"]; |
| | | if (pushTime == null) |
| | | { |
| | | //return; |
| | | } |
| | | else |
| | | { |
| | | if (!string.IsNullOrEmpty(pushTime.ToString())) |
| | | { |
| | | var pushDateTime = Utlis.UnixToDateTimeMS(Convert.ToInt64(pushTime)); |
| | | if (pushDateTime.AddSeconds(30) < DateTime.Now) |
| | | { |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | catch { } |
| | | |
| | | |
| | | //1.视对讲厂家类型 |
| | | string interphoneTypeEnum = json["interphoneTypeEnum"].ToString(); |
| | |
| | | } |
| | | else if (interphoneTypeEnum == InterphoneType.HDL.ToString()) |
| | | { |
| | | try |
| | | { |
| | | var pushTime = json["pushTime"]; |
| | | if (pushTime == null) |
| | | { |
| | | return; |
| | | } |
| | | if (!string.IsNullOrEmpty(pushTime.ToString())) |
| | | { |
| | | var pushDateTime = Utlis.UnixToDateTimeMS(Convert.ToInt64(pushTime)); |
| | | if (pushDateTime.AddSeconds(30) < DateTime.Now) |
| | | { |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | catch { } |
| | | //HDL Linphone 狄耐克 |
| | | eSVideoInfo.HomeId = jpushMessageInfo.HomeId; |
| | | eSVideoInfo.callId = json["callId"].ToString(); |