密码加密
This commit is contained in:
		| @ -1,5 +1,6 @@ | ||||
| package com.sczx.user.service.impl; | ||||
|  | ||||
| import com.alibaba.nacos.common.utils.MD5Utils; | ||||
| import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||
| import com.sczx.user.common.enums.ApiErrorCode; | ||||
| import com.sczx.user.common.enums.MiniProgramTypeEnum; | ||||
| @ -87,6 +88,7 @@ public class UserServiceImpl implements IUserService { | ||||
|             if (StringUtils.isNotBlank(wxMiniProgramRegRequest.getPhoneEncryptedData()) && StringUtils.isNotBlank(wxMiniProgramRegRequest.getPhoneIv()) | ||||
|                     && StringUtils.isNotBlank(sessionKey)) { | ||||
|                 phoneInfo = weichatInteg.decryptPhoneNumber(sessionKey, wxMiniProgramRegRequest.getPhoneEncryptedData(), wxMiniProgramRegRequest.getPhoneIv()); | ||||
|                 log.info("解密手机号信息:{}", phoneInfo); | ||||
|             } | ||||
|  | ||||
| //            // 3. 解密用户基本信息(昵称、头像等) | ||||
| @ -105,7 +107,7 @@ public class UserServiceImpl implements IUserService { | ||||
|                 newUserPO.setWechatOpenid(openid); | ||||
|                 newUserPO.setUserName(phoneInfo.getPurePhoneNumber()); | ||||
|                 newUserPO.setPhoneNumber(phoneInfo.getPurePhoneNumber()); | ||||
|                 newUserPO.setPassword(MD5Encoder.encode("88888888".getBytes(StandardCharsets.UTF_8))); | ||||
|                 newUserPO.setPassword(MD5Utils.md5Hex(phoneInfo.getPurePhoneNumber(), StandardCharsets.UTF_8.name())); | ||||
|  | ||||
|                 newUserPO.setNickName(phoneInfo.getPurePhoneNumber()); | ||||
| //                newUserPO.setAvatarUrl(Optional.ofNullable(userInfo).map(WechatDecryptedUserInfo::getAvatarUrl).orElse(null)); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user