Commit da8d2be5 authored by lee_mingzhu's avatar lee_mingzhu

fix bug

parent b9efdd7f
...@@ -59,4 +59,8 @@ public interface Constants { ...@@ -59,4 +59,8 @@ public interface Constants {
String SCOPE = "snsapi_userinfo"; String SCOPE = "snsapi_userinfo";
} }
interface UserAvatar {
String AVATAR_DEFAULT = "https://avatar.xyqb.com/default_avatar.png";
}
} }
package cn.quantgroup.xyqb.controller.external.user.center; package cn.quantgroup.xyqb.controller.external.user.center;
import cn.quantgroup.xyqb.Constants;
import cn.quantgroup.xyqb.entity.*; import cn.quantgroup.xyqb.entity.*;
import cn.quantgroup.xyqb.entity.enumerate.EducationEnum; import cn.quantgroup.xyqb.entity.enumerate.EducationEnum;
import cn.quantgroup.xyqb.entity.enumerate.IncomeRangeEnum; import cn.quantgroup.xyqb.entity.enumerate.IncomeRangeEnum;
...@@ -87,6 +88,9 @@ public class UserCenterController { ...@@ -87,6 +88,9 @@ public class UserCenterController {
if(null == userId || userId == 0L) { if(null == userId || userId == 0L) {
return JsonResult.buildErrorStateResult(null, null); return JsonResult.buildErrorStateResult(null, null);
} }
if(StringUtils.isBlank(avatarUrl)) {
avatarUrl = Constants.UserAvatar.AVATAR_DEFAULT;
}
UserAttached userAttached = userCenterService.searchUserAttachedByUserId(userId); UserAttached userAttached = userCenterService.searchUserAttachedByUserId(userId);
//查询到数据,直接更新头像和更新时间 //查询到数据,直接更新头像和更新时间
if(null != userAttached) { if(null != userAttached) {
......
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