Showing
1 changed file
with
5 additions
and
3 deletions
@@ -74,9 +74,11 @@ public class TkVideoServiceImpl extends AbstractBaseService<TkVideoMapper, TkVid | @@ -74,9 +74,11 @@ public class TkVideoServiceImpl extends AbstractBaseService<TkVideoMapper, TkVid | ||
74 | videoDTO.getId())); | 74 | videoDTO.getId())); |
75 | } | 75 | } |
76 | TkVideoPlatformEntity platform = tkVideoPlatformMapper.selectById(videoDTO.getVideoPlatformId()); | 76 | TkVideoPlatformEntity platform = tkVideoPlatformMapper.selectById(videoDTO.getVideoPlatformId()); |
77 | - String paramKey = videoDTO.getParams()==null?"":(videoDTO.getParams().get("channelNo")==null?"": | ||
78 | - "&channelNo="+videoDTO.getParams().get("channelNo").intValue()); | ||
79 | - VideoUrlUtils.clearVideoUrlData(platform.getAppKey()+videoDTO.getSn()+paramKey); | 77 | + if(platform!=null){ |
78 | + String paramKey = videoDTO.getParams()==null?"":(videoDTO.getParams().get("channelNo")==null?"": | ||
79 | + "&channelNo="+videoDTO.getParams().get("channelNo").intValue()); | ||
80 | + VideoUrlUtils.clearVideoUrlData(platform.getAppKey()+videoDTO.getSn()+paramKey); | ||
81 | + } | ||
80 | baseMapper.updateById(videoDTO.getEntity(TkVideoEntity.class)); | 82 | baseMapper.updateById(videoDTO.getEntity(TkVideoEntity.class)); |
81 | } else { | 83 | } else { |
82 | baseMapper.insert(videoDTO.getEntity(TkVideoEntity.class)); | 84 | baseMapper.insert(videoDTO.getEntity(TkVideoEntity.class)); |