Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature-edit-password #21

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

feature-edit-password #21

wants to merge 2 commits into from

Conversation

DC-SY
Copy link
Contributor

@DC-SY DC-SY commented May 26, 2024

🤔 这个变动的性质是?

  • ✨ 新特性开发
  • 🐞 Bug 修复
  • 🦢 重构
  • 📝 文档、注释
  • 🚀 打包、CI相关
  • 🖐️ 测试用例
  • 📘 其他改动(是关于什么的改动?)

💡 需求背景和解决方案

用户通过旧密码进行修改密码

⚠️ 是否是破坏性的改动?

  • 是(yes)

  • 否(no)

@DC-SY DC-SY requested a review from XiaoLFeng May 26, 2024 12:44
Copy link
Member

@XiaoLFeng XiaoLFeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

部分存在问题

if (userDAO.editPassword(uuid, Util.INSTANCE.encryptPassword(authUserEditPasswordVO.getNewPassword()))) {
mailService.sendMail(
getUser.getEmail(),
MailTemplateEnum.USER_EDIT_PASSWORD, Map.of("username", getUser.getUsername())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

要换行就都换

* @return 是否修改成功
*/
fun editPassword(uuid: String, password: String): Boolean {
val user = this.getUserByUUID(uuid)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

在服务层已判断,无需重复判断

@@ -72,4 +73,5 @@ interface UserService {
* @return 成功发送返回真,否则返回假
*/
fun sendMailVerify(email: String)
fun editPassword(authUserEditPasswordVO: AuthUserEditPasswordVO, uuid: String): Boolean
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

javaDoc

@@ -26,4 +26,5 @@ package com.frontleaves.fantasticeditor.constant
enum class MailTemplateEnum(val subject: String, val template: String, val description: String, val hashCode: Boolean) {
USER_REGISTER("用户注册", "user-register", "用户进行注册时候所发送的内容", true),
USER_LOGIN("用户登录", "user-login", "用户进行登录时候所发送的内容", true),
USER_EDIT_PASSWORD("用户修改密码", "user-edit-password", "用户进行修改密码时候所发送的内容", true),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

若不是发送邮件最后的布尔是 false,已提交 javaDoc 文档修正

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants