diff --git a/src/main/java/com/yutou/tools/services/BangumiServiceImpl.java b/src/main/java/com/yutou/tools/services/BangumiServiceImpl.java index 29f7bea..2c7386d 100644 --- a/src/main/java/com/yutou/tools/services/BangumiServiceImpl.java +++ b/src/main/java/com/yutou/tools/services/BangumiServiceImpl.java @@ -39,7 +39,7 @@ public class BangumiServiceImpl implements BangumiService { @Override public int addBangumiItem(BangumiItem... list) { for (BangumiItem item : list) { - if (item.getId().equals(-1)) { + if (item.getId() != null&&item.getId().equals(-1)) { RedisTools.list_add("anim_tmp_rss", JSON.toJSON(item).toString()); } else if (itemDao.insert(item) <= 0) { return 0;