add action

This commit is contained in:
trunglt251292 2022-10-28 11:17:29 +07:00
parent 0b0a22a09c
commit 4ac79fdbdb
2 changed files with 10 additions and 0 deletions

View File

@ -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)

View File

@ -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 (