用户可以开关是否使用密码

This commit is contained in:
张松 2025-09-29 20:29:45 +08:00
parent ca6039bb55
commit 427cee9f6b
3 changed files with 3 additions and 0 deletions

View File

@ -20,4 +20,5 @@ public class UserInfoPwdEditDTO {
*/ */
@NotEmpty(message = "验证码不为空") @NotEmpty(message = "验证码不为空")
private String code; private String code;
private Integer usePayPwd;
} }

View File

@ -94,5 +94,6 @@ public class UserInfo implements Serializable {
@Column(onInsertValue = "now()", onUpdateValue = "now()") @Column(onInsertValue = "now()", onUpdateValue = "now()")
private LocalDateTime updateTime; private LocalDateTime updateTime;
private Integer usePayTwd;
} }

View File

@ -88,6 +88,7 @@ public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo> i
throw new ApiNotPrintException("验证码错误"); throw new ApiNotPrintException("验证码错误");
} }
userInfo.setUsePayTwd(userInfoPwdEditDTO.getUsePayPwd());
userInfo.setPayPwd(SecureUtil.md5(userInfoPwdEditDTO.getPayPwd())); userInfo.setPayPwd(SecureUtil.md5(userInfoPwdEditDTO.getPayPwd()));
boolean b = updateById(userInfo); boolean b = updateById(userInfo);
if (b) { if (b) {