完成重构数据库操作代码

This commit is contained in:
dushixiang
2021-03-18 23:36:25 +08:00
parent 0150361054
commit 25b8381a4f
44 changed files with 2292 additions and 2016 deletions

View File

@ -111,7 +111,7 @@ func LoginSuccess(c echo.Context, loginAccount LoginAccount, user model.User) (t
Remember: authorization.Remember,
}
if model.CreateNewLoginLog(&loginLog) != nil {
if loginLogRepository.Create(&loginLog) != nil {
return "", err
}
@ -179,7 +179,7 @@ func LogoutEndpoint(c echo.Context) error {
token := GetToken(c)
cacheKey := BuildCacheKeyByToken(token)
global.Cache.Delete(cacheKey)
err := model.Logout(token)
err := userService.Logout(token)
if err != nil {
return err
}