From e1fccbca16ec60926e0c568fd69e120a657c9698 Mon Sep 17 00:00:00 2001 From: saysky <847064370@qq.com> Date: Wed, 16 Oct 2019 17:34:16 +0800 Subject: [PATCH] fix bug --- .../com/liuyanzhao/sens/service/impl/CategoryServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/liuyanzhao/sens/service/impl/CategoryServiceImpl.java b/src/main/java/com/liuyanzhao/sens/service/impl/CategoryServiceImpl.java index faa2336..9743d31 100755 --- a/src/main/java/com/liuyanzhao/sens/service/impl/CategoryServiceImpl.java +++ b/src/main/java/com/liuyanzhao/sens/service/impl/CategoryServiceImpl.java @@ -186,7 +186,7 @@ public List cateIdsToCateList(List cateIds, Long userId) { List allCateIds = categoryList.stream().map(Category::getId).collect(Collectors.toList()); List result = new ArrayList<>(); for(Long id : cateIds) { - if(!allCateIds.contains(id)) { + if(allCateIds.contains(id)) { Category category = new Category(); category.setId(id); result.add(category);