private static void UserMsgItem2Mongo(IAppSyncService service, List <Services.SyncStateDto> syncInfos, UserMessageQueueItem msgItem) { if (null == syncInfos) { var logger = log4net.LogManager.GetLogger(typeof(MsmqSync)); logger.Info("没有相关人员需要发送消息!"); } else { foreach (var info in syncInfos) { msgItem.UserID = info.UserID; msgItem.Device = info.DeviceID; service.AddUserMessageQueueItem(msgItem); } } }
public SyncDataController() { service = Ioc.GetService <IAppSyncService>(); }