个人中心修改密码

This commit is contained in:
2025-09-18 08:54:29 +08:00
parent 540a6fc1da
commit 11e48acc81
3 changed files with 64 additions and 11 deletions

View File

@ -19,6 +19,7 @@ import com.fuyuanshen.common.core.utils.SpringUtils;
import com.fuyuanshen.common.core.utils.StringUtils;
import com.fuyuanshen.common.log.event.LogininforEvent;
import com.fuyuanshen.common.redis.utils.RedisUtils;
import com.fuyuanshen.common.satoken.utils.AppLoginHelper;
import com.fuyuanshen.common.tenant.helper.TenantHelper;
import com.fuyuanshen.common.web.config.properties.CaptchaProperties;
import com.fuyuanshen.system.domain.SysUser;
@ -142,4 +143,13 @@ public class AppRegisterService {
.set("password", password);
userMapper.update(updateWrapper);
}
public void updatePassword(AppRegisterBody body) {
String username = AppLoginHelper.getUsername();
String password = body.getPassword();
UpdateWrapper<AppUser> updateWrapper = new UpdateWrapper<>();
updateWrapper.eq("user_name", username)
.set("password", password);
userMapper.update(updateWrapper);
}
}