增加重置用户密码功能

This commit is contained in:
蒋吉兆
2021-11-17 22:45:16 +08:00
parent 7c72ab9dcb
commit ff4121510c
12 changed files with 149 additions and 5 deletions
+11
View File
@@ -187,3 +187,14 @@ func (userService *UserService) FindUserByUuid(uuid string) (err error, user *sy
}
return nil, &u
}
//@author: [piexlmax](https://github.com/piexlmax)
//@function: resetPassword
//@description: 修改用户密码
//@param: ID uint
//@return: err error
func (userService *UserService) ResetPassword(ID uint) (err error) {
err = global.GVA_DB.Model(&system.SysUser{}).Where("id = ?", ID).Update("password", utils.MD5V([]byte("123456"))).Error
return err
}