用户名称更新

main
cheney 11 months ago
parent 888ad01be7
commit 334671f232
  1. 16
      users/src/main/java/com/huoran/users/service/impl/HrUserAccountServiceImpl.java

@ -443,18 +443,12 @@ public class HrUserAccountServiceImpl extends ServiceImpl<HrUserAccountMapper, H
@Override
public R updateAvatars(String openId, String url, String userName) {
//查询账号详情List
List<HrUserAccount> userAccountList = hrUserAccountMapper.selectList(new QueryWrapper<HrUserAccount>()
.eq("app_open_id", openId));
//查询个人端用户信息
Integer userId = null;
for (HrUserAccount hrUserAccount : userAccountList) {
if (hrUserAccount.getPlatformId().equals("7")){
userId = hrUserAccount.getUserId();
}
}
//查询账号详情
HrUserAccount hrUserAccount = hrUserAccountMapper.selectOne(new QueryWrapper<HrUserAccount>()
.eq("app_open_id", openId).eq("platform_id", 7));
//查询用户信息
HrUserInfo hrUserInfo = hrUserInfoMapper.selectByUserId(userId);
HrUserInfo hrUserInfo = hrUserInfoMapper.selectByUserId(hrUserAccount.getUserId());
if (StringUtils.isNotBlank(url)){
hrUserInfo.setUserAvatars(url);
}

Loading…
Cancel
Save