|
@@ -39,6 +39,7 @@ namespace OASystem.API.OAMethodLib
|
|
|
private static readonly TableOperationRecordRepository _tableOperationRecordRep = AutofacIocManager.Instance.GetService<TableOperationRecordRepository>();
|
|
|
private static readonly MessageRepository _messageRep = AutofacIocManager.Instance.GetService<MessageRepository>();
|
|
|
private static readonly DeviceTokenRepository _deviceTokenRep = AutofacIocManager.Instance.GetService<DeviceTokenRepository>();
|
|
|
+ private static readonly IAPNsService _APNsService = AutofacIocManager.Instance.GetService<IAPNsService>();
|
|
|
private static readonly IHubContext<ChatHub, IChatClient> _hubContext = AutofacIocManager.Instance.GetService<IHubContext<ChatHub, IChatClient>>();
|
|
|
|
|
|
private readonly static string[] weekdays = new string[] { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" };
|
|
@@ -4450,7 +4451,7 @@ namespace OASystem.API.OAMethodLib
|
|
|
var rst = await _deviceTokenRep.Query(s => s.Number == Numbers).SingleAsync();
|
|
|
Result rst2 = new Result() { Code = -1, Msg = "" };
|
|
|
if (rst != null) {
|
|
|
- rst2 = await APNsLib.APNsLib.pushMsg("com.panamerican.oa2024", rst.DeviceToken, NotificationType.Alert, title, subtitle, body);
|
|
|
+ rst2 = await _APNsService.PushNotification("com.panamerican.oa2024", rst.DeviceToken, NotificationType.Alert, title, subtitle, body);
|
|
|
}
|
|
|
return rst2;
|
|
|
}
|