fix(用户管理): 修复不传 realname 时查询用户列表抛 NPE 的问题
对 realname 参数增加非空判断,避免 null 值时调用 replaceAll 抛出 NullPointerException Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
690f688c6a
commit
6c08f5f141
+4
-2
@@ -192,8 +192,10 @@ public class HealthUserEmployeeExServiceImpl extends ServiceImpl<HealthUserEmplo
|
||||
}
|
||||
List<String> orgCodes = GlobalUtils.getManagedCodes(filter.getOrgCode());
|
||||
filter.setOrgCodes(orgCodes);
|
||||
// 20260330 · 名字中包含·需要转义回·
|
||||
filter.setRealname(filter.getRealname().replaceAll("·", "·"));
|
||||
// 名字中包含·(中文间隔号)时,前端可能传入 HTML 实体 ·,需转义回原字符
|
||||
if (StrUtil.isNotBlank(filter.getRealname())) {
|
||||
filter.setRealname(filter.getRealname().replaceAll("·", "·"));
|
||||
}
|
||||
IPage<UserEmployee> userEmployeeIPage = healthUserEmployeeExMapper.queryUserEmployeeList(page, filter);
|
||||
if (CollectionUtils.isEmpty(userEmployeeIPage.getRecords())) {
|
||||
return userEmployeeIPage;
|
||||
|
||||
Reference in New Issue
Block a user