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