add gorm update create hook

This commit is contained in:
landaiqing
2024-09-10 22:45:03 +08:00
parent e87a511ece
commit 5c30db51f1
7 changed files with 154 additions and 3 deletions

View File

@@ -122,6 +122,7 @@ func HandelUserLogin(userId string) (bool, map[string]interface{}) {
"data": data,
"success": true,
}
global.DB.Set("user_id", userId)
return true, responseData
}

View File

@@ -344,7 +344,7 @@ func handelUserLogin(user model.ScaAuthUser, autoLogin bool, c *gin.Context) {
result.FailWithMessage(ginI18n.MustGetMessage(c, "LoginFailed"), c)
return
}
global.DB.Set("user_id", user.UID)
result.OkWithData(data, c)
}