Commit 4d6205b
authored
Feat/get user roles (#1463)
* RoleSelectDto 增加 CreationTime 字段及相关适配
RoleSelectDto 类新增 CreationTime(创建时间)属性,移除无参构造函数,所有相关构造函数调用均需传入 CreationTime。同步调整 User.cs 和 QueryHandler.cs 中 RoleModel 及 RoleSelectDto 的创建逻辑,确保角色信息包含创建时间,便于前端展示和业务处理。
* 优化用户角色查询及数据结构
- 移除 RoleSelectDto 的 CreationTime 属性及相关参数,简化角色选择数据结构
- 新增 UserRoleDto 类,支持用户角色信息(编码、名称、绑定时间)
- 新增 UserRolesQuery 查询对象,实现按用户ID查询角色列表
- QueryHandler 增加 GetUserRolesAsync 方法,完善角色查询逻辑
- UserService 新增 GetUserRolesAsync 接口,路由为 /{id}/roles
- 补充部分文件的 Apache License 版权声明
- 提升用户角色相关功能的规范性和可维护性
* 移除RoleSelectDto中的creationTime参数及相关引用
本次提交移除了RoleSelectDto构造函数中的creationTime参数,并同步更新了所有相关的实例化调用。现在RoleSelectDto仅包含id、name、code、limit和availableQuantity字段,简化了数据结构。1 parent 51caa5d commit 4d6205b
2 files changed
Lines changed: 2 additions & 3 deletions
File tree
- src
- Contracts/Masa.Auth.Contracts.Admin/Permissions
- Services/Masa.Auth.Service.Admin/Application/Permissions
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | 25 | | |
27 | 26 | | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
| 300 | + | |
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| |||
0 commit comments