fix 推送配置可能是空

This commit is contained in:
李鹏军 2024-03-20 17:23:08 +08:00
parent c4917d66cc
commit 038c495dfa
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ public interface ITrackPushCacheService
/// <param name="customId">服务商id</param> /// <param name="customId">服务商id</param>
/// <param name="trackContentId"></param> /// <param name="trackContentId"></param>
/// <returns></returns> /// <returns></returns>
Task<TrackPushContentConfigDto> GetPushContentConfigAsync(int subSystemId, int customId, int trackContentId); Task<TrackPushContentConfigDto?> GetPushContentConfigAsync(int subSystemId, int customId, int trackContentId);
/// <summary> /// <summary>
/// 根据轨迹代码推断下一个(升序)要推送的内容,如果找不到或者已经是最后一个了,返回null /// 根据轨迹代码推断下一个(升序)要推送的内容,如果找不到或者已经是最后一个了,返回null

View File

@ -162,7 +162,7 @@ public class TrackUpsertEventHandler : ITransientDependency, ICapSubscribe
{ {
config = await _trackPushCacheService.GetPushContentConfigAsync( config = await _trackPushCacheService.GetPushContentConfigAsync(
@event.SubSystemId, @event.CustomId, track.TrackContentId); @event.SubSystemId, @event.CustomId, track.TrackContentId);
if (!config.IsCanUpdate) return; if (config == null || !config.IsCanUpdate) return;
} }
else else
{ {