This commit is contained in:
2025-06-13 17:23:16 +08:00
parent 3150ba80bc
commit 1b72f51e4a
55 changed files with 3894 additions and 310 deletions

View File

@@ -24,6 +24,10 @@ func (b *auditLogService) Create(ctx context.Context, req *system.AuditLog) erro
return b.repo.Create(ctx, req)
}
func (b *auditLogService) BatchCreate(ctx context.Context, objs []*system.AuditLog) error {
return b.repo.BatchCreate(ctx, objs)
}
func (b *auditLogService) List(ctx context.Context, q dto.SearchDto) ([]*system.AuditLog, int64, error) {
return b.repo.List(ctx, q)
}

View File

@@ -179,11 +179,12 @@ func (s *userService) login(ctx context.Context, req *form.Login) error {
}
func (s *userService) loginSuccess(ctx context.Context, user *system.User, req *form.Login) error {
return s.Session.PutUser(ctx, know.StoreName, &dto.AuthorizeUser{
return s.Session.PutUser(ctx, know.StoreName, dto.AuthorizeUser{
ID: user.ID,
Uuid: user.Uuid,
Email: user.Email,
Username: user.Username,
Avatar: user.Avatar,
RoleID: user.Role.ID,
RoleName: user.Role.DisplayName,
OS: req.Os,