diff --git a/action.go b/action.go index c31feb7..f46c212 100644 --- a/action.go +++ b/action.go @@ -69,6 +69,11 @@ func (s Service) GetUsersByPermission(query model.UserByPermissionQuery) model.U return user.GetUsersByPermission(query) } +// CountByCondition ... +func (s Service) CountByCondition(filter interface{}) int64 { + return user.CountByCondition(filter) +} + // CountAllUsers ... func (s Service) CountAllUsers(query model.UserCountQuery) int64 { return user.Count(query) diff --git a/user/handle.go b/user/handle.go index a53958b..3bbd34d 100644 --- a/user/handle.go +++ b/user/handle.go @@ -278,6 +278,11 @@ func GetUsersByPermission(queryParams model.UserByPermissionQuery) (r model.User return } +// CountByCondition ... +func CountByCondition(filter interface{}) int64 { + return countByCondition(context.Background(), filter) +} + // Count ... func Count(queryParams model.UserCountQuery) int64 { var (