From b0d1f7133756335f4d6d72cc5c3fe1960b5e7420 Mon Sep 17 00:00:00 2001 From: wans <747101512@qq.com> Date: Sun, 16 May 2021 09:30:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basicstaffinfo/impl/BasicStaffInfoServiceImpl.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/module-staff/src/main/java/cn/com/tenlion/staff/service/basicstaffinfo/impl/BasicStaffInfoServiceImpl.java b/module-staff/src/main/java/cn/com/tenlion/staff/service/basicstaffinfo/impl/BasicStaffInfoServiceImpl.java index 89e425b..c1b1117 100644 --- a/module-staff/src/main/java/cn/com/tenlion/staff/service/basicstaffinfo/impl/BasicStaffInfoServiceImpl.java +++ b/module-staff/src/main/java/cn/com/tenlion/staff/service/basicstaffinfo/impl/BasicStaffInfoServiceImpl.java @@ -52,10 +52,12 @@ public class BasicStaffInfoServiceImpl extends DefaultBaseService implements IBa Map query = new HashMap<>(4); query.put("bindUserAccount",params.get("creator").toString()); BasicStaffInfoDTO dto = basicStaffInfoDao.getById(query); - List ids = new ArrayList<>(); - ids.add(dto.getBasicStaffInfoId()); - query.put("ids",ids); - basicStaffInfoDao.delete(query); + if(dto != null){ + List ids = new ArrayList<>(); + ids.add(dto.getBasicStaffInfoId()); + query.put("ids",ids); + basicStaffInfoDao.delete(query); + } } else { setSaveInfo(params); }