适配微信登录最新规则

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(); AppUserEntity appUser = new AppUserEntity();
appUser.setGender(0); appUser.setGender(0);
appUser.setAvatar(form.getAvatar()); // appUser.setAvatar(form.getAvatar());
appUser.setUsername(form.getUsername()); // appUser.setUsername(form.getUsername());
appUser.setAvatar(Constant.DEAULT_HEAD);
appUser.setUsername("LF_wx" + RandomUtil.randomNumbers(8));
appUser.setCreateTime(DateUtil.nowDateTime()); appUser.setCreateTime(DateUtil.nowDateTime());
appUser.setUpdateTime(DateUtil.nowDateTime()); appUser.setUpdateTime(DateUtil.nowDateTime());
appUser.setOpenid(openId); appUser.setOpenid(openId);

View File

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