Commit 98a6bcca authored by 唐峰's avatar 唐峰

定时任务微信获取用户异常修复

parent 78dbbbb2
......@@ -185,7 +185,6 @@ public class UserApiV2Controller implements IBaseController {
}
try {
log.info("获取批量信息,userList:{}, wechatList:{}", JSONObject.toJSONString(userList), JSONObject.toJSONString(wechatUserInfo));
List<UserBean> from = UserBean.from(userList, wechatUserInfo);
return JsonResult.buildSuccessResultGeneric(from);
} catch (Exception e) {
......
......@@ -74,7 +74,7 @@ public class UserBean {
userBean.setTenantId(user.getTenantId());
userBean.setCreatedAt(user.getCreatedAt());
if (CollectionUtils.isNotEmpty(wechatUserInfoList)) {
Optional<WechatUserInfo> optionalWechatUserInfo = wechatUserInfoList.stream().filter(i -> i.getUserId().equals(user.getId())).findFirst();
Optional<WechatUserInfo> optionalWechatUserInfo = wechatUserInfoList.stream().filter(i -> i.getUserId() != null && i.getUserId().equals(user.getId())).findFirst();
if (optionalWechatUserInfo.isPresent()) {
WechatUserInfo wechatUserInfo = optionalWechatUserInfo.get();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment