重构角色和权限相关DTO,替换RoleDto为RoleRespDto,并更新相关服务和控制器逻辑

This commit is contained in:
Chuck1sn
2025-06-16 10:57:35 +08:00
parent 7b8ef54e7b
commit ea10b156e3
34 changed files with 543 additions and 405 deletions

View File

@@ -289,7 +289,7 @@
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/RoleDto"
"$ref": "#/components/schemas/RoleRespDto"
}
}
}
@@ -1031,7 +1031,7 @@
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/PageResponseDtoListRoleDto"
"$ref": "#/components/schemas/PageResponseDtoListRoleRespDto"
}
}
}
@@ -1718,6 +1718,12 @@
}
},
"PermissionRespDto": {
"required": [
"code",
"id",
"isBound",
"name"
],
"type": "object",
"properties": {
"id": {
@@ -1735,7 +1741,13 @@
}
}
},
"RoleDto": {
"RoleRespDto": {
"required": [
"code",
"id",
"isBound",
"name"
],
"type": "object",
"properties": {
"id": {
@@ -1760,6 +1772,12 @@
}
},
"UserRolePermissionDto": {
"required": [
"createTime",
"enable",
"id",
"username"
],
"type": "object",
"properties": {
"id": {
@@ -1782,7 +1800,7 @@
"roles": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RoleDto"
"$ref": "#/components/schemas/RoleRespDto"
}
},
"createTime": {
@@ -1832,7 +1850,7 @@
}
}
},
"PageResponseDtoListRoleDto": {
"PageResponseDtoListRoleRespDto": {
"type": "object",
"properties": {
"total": {
@@ -1842,7 +1860,7 @@
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RoleDto"
"$ref": "#/components/schemas/RoleRespDto"
}
}
}

View File

@@ -779,29 +779,29 @@ export interface components {
};
PermissionRespDto: {
/** Format: int64 */
id?: number;
code?: string;
name?: string;
isBound?: boolean;
id: number;
code: string;
name: string;
isBound: boolean;
};
RoleDto: {
RoleRespDto: {
/** Format: int64 */
id?: number;
code?: string;
name?: string;
isBound?: boolean;
id: number;
code: string;
name: string;
isBound: boolean;
permissions?: components["schemas"]["PermissionRespDto"][];
};
UserRolePermissionDto: {
/** Format: int64 */
id?: number;
username?: string;
id: number;
username: string;
password?: string;
avatar?: string;
enable?: boolean;
roles?: components["schemas"]["RoleDto"][];
enable: boolean;
roles?: components["schemas"]["RoleRespDto"][];
/** Format: date-time */
createTime?: string;
createTime: string;
permissions?: components["schemas"]["PermissionRespDto"][];
};
RoleQueryDto: {
@@ -815,10 +815,10 @@ export interface components {
/** @enum {string} */
bindState?: "BIND" | "UNBIND" | "ALL";
};
PageResponseDtoListRoleDto: {
PageResponseDtoListRoleRespDto: {
/** Format: int64 */
total?: number;
data?: components["schemas"]["RoleDto"][];
data?: components["schemas"]["RoleRespDto"][];
};
PermissionQueryDto: {
/** Format: int64 */
@@ -1113,7 +1113,7 @@ export interface operations {
[name: string]: unknown;
};
content: {
"*/*": components["schemas"]["RoleDto"];
"*/*": components["schemas"]["RoleRespDto"];
};
};
};
@@ -1750,7 +1750,7 @@ export interface operations {
[name: string]: unknown;
};
content: {
"*/*": components["schemas"]["PageResponseDtoListRoleDto"];
"*/*": components["schemas"]["PageResponseDtoListRoleRespDto"];
};
};
};