fix: GetMaxUserId use Unscope, close #987

This commit is contained in:
creamlike1024
2025-04-25 16:13:11 +08:00
parent db3326deae
commit c2b33e3b23

View File

@@ -108,7 +108,7 @@ func CheckUserExistOrDeleted(username string, email string) (bool, error) {
func GetMaxUserId() int {
var user User
DB.Last(&user)
DB.Unscoped().Last(&user)
return user.Id
}