fix allQueryModel
This commit is contained in:
parent
79b32fa209
commit
7753de40ef
|
@ -27,6 +27,7 @@ type PermissionUpdateOptions struct {
|
|||
type PermissionAllQuery struct {
|
||||
Page int64
|
||||
Limit int64
|
||||
Sort interface{}
|
||||
}
|
||||
|
||||
// Validate ...
|
||||
|
|
|
@ -22,6 +22,7 @@ type RoleUpdateOptions struct {
|
|||
type RoleAllQuery struct {
|
||||
Page int64
|
||||
Limit int64
|
||||
Sort interface{}
|
||||
}
|
||||
|
||||
// Validate ...
|
||||
|
|
|
@ -39,6 +39,7 @@ type UserAllQuery struct {
|
|||
Keyword string
|
||||
RoleID string
|
||||
Status string
|
||||
Sort interface{}
|
||||
}
|
||||
|
||||
// Validate ...
|
||||
|
|
|
@ -104,7 +104,7 @@ func All(queryParams model.PermissionAllQuery) (r model.PermissionAll) {
|
|||
query := model.CommonQuery{
|
||||
Page: queryParams.Page,
|
||||
Limit: queryParams.Limit,
|
||||
Sort: bson.M{"createdAt": -1},
|
||||
Sort: queryParams.Sort,
|
||||
}
|
||||
|
||||
// Assign condition
|
||||
|
|
|
@ -102,7 +102,7 @@ func All(queryParams model.RoleAllQuery) (r model.RoleAll) {
|
|||
query := model.CommonQuery{
|
||||
Page: queryParams.Page,
|
||||
Limit: queryParams.Limit,
|
||||
Sort: bson.M{"createdAt": -1},
|
||||
Sort: queryParams.Sort,
|
||||
}
|
||||
|
||||
// Assign condition
|
||||
|
|
|
@ -87,7 +87,7 @@ func All(queryParams model.UserAllQuery) (r model.UserAll) {
|
|||
Keyword: queryParams.Keyword,
|
||||
RoleID: queryParams.RoleID,
|
||||
Status: queryParams.Status,
|
||||
Sort: bson.M{"createdAt": -1},
|
||||
Sort: queryParams.Sort,
|
||||
}
|
||||
|
||||
// Assign condition
|
||||
|
|
Loading…
Reference in New Issue