Commit 6994ffa8 authored by xuepeng.chang's avatar xuepeng.chang

头像刷新

parent 16c95443
...@@ -330,8 +330,11 @@ public class UserCenterController implements IBaseController { ...@@ -330,8 +330,11 @@ public class UserCenterController implements IBaseController {
return; return;
} }
byte[] avatarBytes = HttpClientUtil.download(avatarUrl); byte[] avatarBytes = HttpClientUtil.download(avatarUrl);
// log.info("头像:"+avatarBytes);
if(Objects.isNull(avatarBytes)){ if(Objects.isNull(avatarBytes)){
log.info("下载头像失败.id={},avatarUrl={}", userInfoEntity.getId(),avatarUrl); log.info("下载头像失败.id={},avatarUrl={}", userInfoEntity.getId(),avatarUrl);
userInfoEntity.setPhoto("https://img.91xr.cn/avatar.18dd2e2a.png");
userInfoRepository.save(userInfoEntity);
return; return;
} }
String imageName = "avatar/"+UUID.randomUUID().toString()+".jpg"; String imageName = "avatar/"+UUID.randomUUID().toString()+".jpg";
......
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