v1
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
"management/internal/erpserver/model/dto"
|
||||
"management/internal/erpserver/model/system"
|
||||
"management/internal/erpserver/model/system/request"
|
||||
"management/internal/erpserver/service/v1"
|
||||
)
|
||||
|
||||
@@ -25,7 +26,7 @@ func (s *loginLogService) Create(ctx context.Context, req *system.LoginLog) erro
|
||||
return s.repo.Create(ctx, req)
|
||||
}
|
||||
|
||||
func (s *loginLogService) List(ctx context.Context, q dto.SearchDto) ([]*system.LoginLog, int64, error) {
|
||||
func (s *loginLogService) List(ctx context.Context, q request.ListLoginLog) ([]*system.LoginLog, int64, error) {
|
||||
count, err := s.repo.Count(ctx, q)
|
||||
if err != nil {
|
||||
return nil, 0, err
|
||||
@@ -56,8 +57,8 @@ func (s *loginLogService) LoginTime(ctx context.Context, email string) (dto.Logi
|
||||
}
|
||||
|
||||
func (s *loginLogService) LoginCount(ctx context.Context, email string) int64 {
|
||||
count, err := s.repo.Count(ctx, dto.SearchDto{
|
||||
SearchEmail: email,
|
||||
count, err := s.repo.Count(ctx, request.ListLoginLog{
|
||||
Email: email,
|
||||
})
|
||||
if err != nil {
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user