From 39ceb4bb88f5eae0928ffddabeba9849999bd248 Mon Sep 17 00:00:00 2001 From: ly19960718 <1622779752@qq.com> Date: Fri, 4 Jun 2021 17:24:04 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=A0=8F=E7=9B=AE=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/UserColumnServiceImpl.java | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/main/java/cn/com/tenlion/service/usercolumn/impl/UserColumnServiceImpl.java b/src/main/java/cn/com/tenlion/service/usercolumn/impl/UserColumnServiceImpl.java index 59f4563..d5d0109 100644 --- a/src/main/java/cn/com/tenlion/service/usercolumn/impl/UserColumnServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/usercolumn/impl/UserColumnServiceImpl.java @@ -43,16 +43,24 @@ public class UserColumnServiceImpl extends DefaultBaseService implements IUserCo } catch (ReflectUtil.ReflectException e) { throw new SaveException("系统错误"); } - - String[] columnIds = userColumnVO.getColumnId().split(","); - for (String columnId : columnIds) { - UserColumnVO vo =new UserColumnVO(); - vo.setColumnId(columnId); - this.save(token,vo); + if(!StringUtils.isBlank(userColumnVO.getColumnId())){ + String[] columnIds = userColumnVO.getColumnId().split(","); + for (String columnId : columnIds) { + UserColumnVO vo =new UserColumnVO(); + vo.setColumnId(columnId); + this.save(token,vo); + } } } + + + + + + + public void deleteByCreator(String creator){ Map params = new HashMap<>(1); params.put("creator",creator); @@ -65,7 +73,6 @@ public class UserColumnServiceImpl extends DefaultBaseService implements IUserCo Map params = new HashMap<>(); params.put("creator",creator); return this.list(params); - }