适配微信登录最新规则

This commit is contained in:
linfeng 2022-10-28 15:24:42 +08:00
parent c91d9aa478
commit ce6d6cffc3
2 changed files with 5 additions and 7 deletions

View File

@ -313,8 +313,10 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserDao, AppUserEntity> i
//新注册用户
AppUserEntity appUser = new AppUserEntity();
appUser.setGender(0);
appUser.setAvatar(form.getAvatar());
appUser.setUsername(form.getUsername());
// appUser.setAvatar(form.getAvatar());
// appUser.setUsername(form.getUsername());
appUser.setAvatar(Constant.DEAULT_HEAD);
appUser.setUsername("LF_wx" + RandomUtil.randomNumbers(8));
appUser.setCreateTime(DateUtil.nowDateTime());
appUser.setUpdateTime(DateUtil.nowDateTime());
appUser.setOpenid(openId);

View File

@ -20,9 +20,7 @@ import javax.validation.constraints.NotBlank;
/**
* 微信登录表单
*
* code: loginCode,
* username: userInfo.nickName,
* avatar: userInfo.avatarUrl,
* code: loginCode,
*/
@Data
@ApiModel(value = "微信登录表单")
@ -33,11 +31,9 @@ public class WxLoginForm {
private String code;
@ApiModelProperty(value = "用户名",required = true)
@NotBlank(message="用户名不能为空")
private String username;
@ApiModelProperty(value = "头像",required = true)
@NotBlank(message="头像不能为空")
private String avatar;
}