From 4801d11b3ba31e82d8ce04be47ea4441007a7b09 Mon Sep 17 00:00:00 2001 From: joylink_zhangsai <1021828630@qq.com> Date: Thu, 25 Mar 2021 20:42:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=99=E5=AD=A6=E7=AE=A1=E7=90=86bug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../club/joylink/rtss/services/SysUserService.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/main/java/club/joylink/rtss/services/SysUserService.java b/src/main/java/club/joylink/rtss/services/SysUserService.java index 6e7b0e255..e9dd9c448 100644 --- a/src/main/java/club/joylink/rtss/services/SysUserService.java +++ b/src/main/java/club/joylink/rtss/services/SysUserService.java @@ -708,12 +708,16 @@ public class SysUserService implements ISysUserService { @Override public List findEntity(List ids, String orderBy) { - SysUserExample example = new SysUserExample(); - if (StringUtils.hasText(orderBy)) { - example.setOrderByClause(orderBy); + if (CollectionUtils.isEmpty(ids)) { + return new ArrayList<>(); + } else { + SysUserExample example = new SysUserExample(); + if (StringUtils.hasText(orderBy)) { + example.setOrderByClause(orderBy); + } + example.createCriteria().andIdIn(ids); + return sysUserDAO.selectByExample(example); } - example.createCriteria().andIdIn(ids); - return sysUserDAO.selectByExample(example); } @Override