正在显示
2 个修改的文件
包含
3 行增加
和
6 行删除
| @@ -6,8 +6,8 @@ import "github.com/beego/beego/v2/core/validation" | @@ -6,8 +6,8 @@ import "github.com/beego/beego/v2/core/validation" | ||
| 6 | type UserRoleQueryCommand struct { | 6 | type UserRoleQueryCommand struct { |
| 7 | CompanyId int64 `cname:"公司ID" json:"companyId"` | 7 | CompanyId int64 `cname:"公司ID" json:"companyId"` |
| 8 | RoleId int64 `cname:"角色ID" json:"roleId,string" valid:"Required"` | 8 | RoleId int64 `cname:"角色ID" json:"roleId,string" valid:"Required"` |
| 9 | - PageNumber int64 `cname:"分页页码" json:"pageNumber"` | ||
| 10 | - PageSize int64 `cname:"分页数量" json:"pageSize"` | 9 | + PageNumber int `cname:"分页页码" json:"pageNumber"` |
| 10 | + PageSize int `cname:"分页数量" json:"pageSize"` | ||
| 11 | } | 11 | } |
| 12 | 12 | ||
| 13 | func (in *UserRoleQueryCommand) Valid(validation *validation.Validation) { | 13 | func (in *UserRoleQueryCommand) Valid(validation *validation.Validation) { |
| @@ -104,10 +104,7 @@ func (rs *RoleUserService) ListRole(in *command.UserRoleQueryCommand) (interface | @@ -104,10 +104,7 @@ func (rs *RoleUserService) ListRole(in *command.UserRoleQueryCommand) (interface | ||
| 104 | }() | 104 | }() |
| 105 | ruRepository := factory.CreateRoleUserRepository(map[string]interface{}{"transactionContext": transactionContext}) | 105 | ruRepository := factory.CreateRoleUserRepository(map[string]interface{}{"transactionContext": transactionContext}) |
| 106 | 106 | ||
| 107 | - in.PageNumber = 1 | ||
| 108 | - in.PageSize = 9999999 | ||
| 109 | - | ||
| 110 | - tempList, err := ruRepository.FindAllContainUser(1, 10, in.CompanyId, in.RoleId) | 107 | + tempList, err := ruRepository.FindAllContainUser(in.PageNumber, in.PageSize, in.CompanyId, in.RoleId) |
| 111 | if err != nil { | 108 | if err != nil { |
| 112 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 109 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
| 113 | } | 110 | } |
-
请 注册 或 登录 后发表评论