From bc90fb7e0c6c8313e7d5fcf3aba57e3a1f975c93 Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期四, 15 八月 2024 17:39:45 +0800 Subject: [PATCH] 对象建模模块,保存统一先进行正则校验(之间是失焦才进行校验) --- Source/Service/ServiceBase/src/com/vci/server/cache/OrgCacheProvider.java | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/Source/Service/ServiceBase/src/com/vci/server/cache/OrgCacheProvider.java b/Source/Service/ServiceBase/src/com/vci/server/cache/OrgCacheProvider.java index afc9eb4..9ef3aae 100644 --- a/Source/Service/ServiceBase/src/com/vci/server/cache/OrgCacheProvider.java +++ b/Source/Service/ServiceBase/src/com/vci/server/cache/OrgCacheProvider.java @@ -22,6 +22,18 @@ return JSONObject.parseObject(json, UserInfo.class); } + public static UserInfo getUserByID(String userId) { + String userName = RedisUtil.getInstance().hget(CacheNames.USERS, userId); + if (StringUtils.isBlank(userName)) + return null; + + String json = RedisUtil.getInstance().hget(CacheNames.USERS, userName.toLowerCase()); + if (StringUtils.isBlank(json)) + return null; + + return JSONObject.parseObject(json, UserInfo.class); + } + public static UserInfo[] getUsers(String[] names) { List<UserInfo> lstObj = new ArrayList<UserInfo>(); -- Gitblit v1.9.3