刘洪青 | 0fb603f | 2018-08-09 10:54:08 +0800 | [diff] [blame] | 1 | openapi: 3.0.0 |
| 2 | info: |
| 3 | version: 1.0.0 |
| 4 | title: Sample User |
| 5 | servers: |
| 6 | - url: 'http://localhost:10010/api/v1' |
| 7 | paths: |
| 8 | '/admin/users': |
| 9 | get: |
| 10 | summary: 查询用户 |
| 11 | operationId: admin-users-list |
| 12 | tags: |
| 13 | - Api1AdminUserController |
| 14 | parameters: |
| 15 | - name: pageIndex |
| 16 | in: query |
| 17 | description: 分页-页码 |
| 18 | required: true |
| 19 | schema: |
| 20 | type: integer |
| 21 | format: int32 |
| 22 | default: 0 |
| 23 | - name: pageSize |
| 24 | in: query |
| 25 | description: 分页-每页记录数 |
| 26 | required: true |
| 27 | schema: |
| 28 | type: integer |
| 29 | format: int32 |
| 30 | default: 20 |
| 31 | - name: 'mapBean[username]' |
| 32 | in: query |
| 33 | description: 查询条件-用户名 |
| 34 | required: false |
| 35 | schema: |
| 36 | type: string |
| 37 | - name: 'mapBean[name]' |
| 38 | in: query |
| 39 | description: 查询条件-姓名 |
| 40 | required: false |
| 41 | schema: |
| 42 | type: string |
| 43 | - name: 'mapBean[status]' |
| 44 | in: query |
| 45 | description: 查询条件-状态(1 启用,0 停用) |
| 46 | required: false |
| 47 | schema: |
| 48 | type: string |
| 49 | responses: |
| 50 | '200': |
| 51 | description: 用户列表 |
| 52 | content: |
| 53 | application/json: |
| 54 | schema: |
| 55 | $ref: '#/components/schemas/UserPager' |
| 56 | default: |
| 57 | description: unexpected error |
| 58 | content: |
| 59 | application/json: |
| 60 | schema: |
| 61 | $ref: '#/components/schemas/Error' |
| 62 | post: |
| 63 | summary: 创建用户 |
| 64 | operationId: admin-users-create |
| 65 | tags: |
| 66 | - Api1AdminUserController |
| 67 | requestBody: |
| 68 | content: |
| 69 | application/json: |
| 70 | schema: |
| 71 | $ref: '#/components/schemas/User' |
| 72 | examples: |
| 73 | test1: |
| 74 | value: { |
| 75 | "companyId": "1", |
| 76 | "deleted": false, |
| 77 | "addAccount": "admin", |
| 78 | "username": "test1", |
| 79 | "password": "test1", |
| 80 | "enabled": true, |
| 81 | "accountNonExpired": true, |
| 82 | "accountNonLocked": true, |
| 83 | "credentialsNonExpired": true, |
| 84 | "name": "测试1", |
| 85 | "status": "1", |
| 86 | } |
| 87 | responses: |
| 88 | '200': |
| 89 | description: 创建成功 |
| 90 | content: |
| 91 | application/json: |
| 92 | schema: |
| 93 | $ref: '#/components/schemas/Success' |
| 94 | examples: |
| 95 | success: |
| 96 | value: |
| 97 | success: info.create.success |
| 98 | default: |
| 99 | description: unexpected error |
| 100 | content: |
| 101 | application/json: |
| 102 | schema: |
| 103 | $ref: '#/components/schemas/Error' |
| 104 | put: |
| 105 | summary: 修改用户 |
| 106 | operationId: admin-users-update |
| 107 | tags: |
| 108 | - Api1AdminUserController |
| 109 | requestBody: |
| 110 | content: |
| 111 | application/json: |
| 112 | schema: |
| 113 | $ref: '#/components/schemas/User' |
| 114 | examples: |
| 115 | test1: |
| 116 | value: { |
| 117 | "id": "1", |
| 118 | "status": "0" |
| 119 | } |
| 120 | responses: |
| 121 | '200': |
| 122 | description: 修改成功 |
| 123 | content: |
| 124 | application/json: |
| 125 | schema: |
| 126 | $ref: '#/components/schemas/Success' |
| 127 | examples: |
| 128 | success: |
| 129 | value: |
| 130 | success: info.update.success |
| 131 | default: |
| 132 | description: unexpected error |
| 133 | content: |
| 134 | application/json: |
| 135 | schema: |
| 136 | $ref: '#/components/schemas/Error' |
| 137 | '/admin/users/{id}': |
| 138 | get: |
| 139 | summary: 根据ID获取用户 |
| 140 | operationId: admin-users-get |
| 141 | tags: |
| 142 | - Api1AdminUserController |
| 143 | parameters: |
| 144 | - name: id |
| 145 | in: path |
| 146 | required: true |
| 147 | description: 用户ID |
| 148 | schema: |
| 149 | type: string |
| 150 | responses: |
| 151 | '200': |
| 152 | description: Expected response to a valid request |
| 153 | content: |
| 154 | application/json: |
| 155 | schema: |
| 156 | $ref: '#/components/schemas/User' |
| 157 | default: |
| 158 | description: unexpected error |
| 159 | content: |
| 160 | application/json: |
| 161 | schema: |
| 162 | $ref: '#/components/schemas/Error' |
| 163 | delete: |
| 164 | summary: 根据ID删除用户 |
| 165 | operationId: admin-users-delete |
| 166 | tags: |
| 167 | - Api1AdminUserController |
| 168 | parameters: |
| 169 | - name: id |
| 170 | in: path |
| 171 | required: true |
| 172 | description: 用户ID |
| 173 | schema: |
| 174 | type: string |
| 175 | responses: |
| 176 | '200': |
| 177 | description: Expected response to a valid request |
| 178 | content: |
| 179 | application/json: |
| 180 | schema: |
| 181 | $ref: '#/components/schemas/Success' |
| 182 | examples: |
| 183 | success: |
| 184 | value: |
| 185 | success: info.delete.success |
| 186 | default: |
| 187 | description: unexpected error |
| 188 | content: |
| 189 | application/json: |
| 190 | schema: |
| 191 | $ref: '#/components/schemas/Error' |
| 192 | '/admin/users/{id}/groups': |
| 193 | get: |
| 194 | summary: 根据ID获取用户的关联用户组 |
| 195 | operationId: admin-users-userGroups |
| 196 | tags: |
| 197 | - Api1AdminUserController |
| 198 | parameters: |
| 199 | - name: id |
| 200 | in: path |
| 201 | required: true |
| 202 | description: 用户ID |
| 203 | schema: |
| 204 | type: string |
| 205 | - name: pageIndex |
| 206 | in: query |
| 207 | description: 分页-页码 |
| 208 | required: true |
| 209 | schema: |
| 210 | type: integer |
| 211 | format: int32 |
| 212 | default: 0 |
| 213 | - name: pageSize |
| 214 | in: query |
| 215 | description: 分页-每页记录数 |
| 216 | required: true |
| 217 | schema: |
| 218 | type: integer |
| 219 | format: int32 |
| 220 | default: 20 |
| 221 | - name: 'mapBean[groupCode]' |
| 222 | in: query |
| 223 | description: 查询条件-用户组代码 |
| 224 | required: false |
| 225 | schema: |
| 226 | type: string |
| 227 | - name: 'mapBean[groupName]' |
| 228 | in: query |
| 229 | description: 查询条件-用户组名称 |
| 230 | required: false |
| 231 | schema: |
| 232 | type: string |
| 233 | - name: 'mapBean[groupStatus]' |
| 234 | in: query |
| 235 | description: 查询条件-用户组状态(1 启用,0 停用) |
| 236 | required: false |
| 237 | schema: |
| 238 | type: string |
| 239 | responses: |
| 240 | '200': |
| 241 | description: 用户的关联用户组列表 |
| 242 | content: |
| 243 | application/json: |
| 244 | schema: |
| 245 | $ref: '#/components/schemas/GroupUserPager' |
| 246 | default: |
| 247 | description: unexpected error |
| 248 | content: |
| 249 | application/json: |
| 250 | schema: |
| 251 | $ref: '#/components/schemas/Error' |
| 252 | post: |
| 253 | summary: 关联用户的用户组 |
| 254 | operationId: admin-users-relateGroups |
| 255 | tags: |
| 256 | - Api1AdminUserController |
| 257 | parameters: |
| 258 | - name: id |
| 259 | in: path |
| 260 | required: true |
| 261 | description: 用户ID |
| 262 | schema: |
| 263 | type: string |
| 264 | requestBody: |
| 265 | content: |
| 266 | application/json: |
| 267 | schema: |
| 268 | $ref: '#/components/schemas/GroupUsers' |
| 269 | responses: |
| 270 | '200': |
| 271 | description: 设置成功 |
| 272 | content: |
| 273 | application/json: |
| 274 | schema: |
| 275 | $ref: '#/components/schemas/Success' |
| 276 | examples: |
| 277 | success: |
| 278 | value: { |
| 279 | "success": "info.set.success" |
| 280 | } |
| 281 | default: |
| 282 | description: unexpected error |
| 283 | content: |
| 284 | application/json: |
| 285 | schema: |
| 286 | $ref: '#/components/schemas/Error' |
| 287 | '/admin/users/{id}/roles': |
| 288 | get: |
| 289 | summary: 根据ID获取用户的关联角色 |
| 290 | operationId: admin-users-userRoles |
| 291 | tags: |
| 292 | - Api1AdminUserController |
| 293 | parameters: |
| 294 | - name: id |
| 295 | in: path |
| 296 | required: true |
| 297 | description: 用户ID |
| 298 | schema: |
| 299 | type: string |
| 300 | - name: pageIndex |
| 301 | in: query |
| 302 | description: 分页-页码 |
| 303 | required: true |
| 304 | schema: |
| 305 | type: integer |
| 306 | format: int32 |
| 307 | default: 0 |
| 308 | - name: pageSize |
| 309 | in: query |
| 310 | description: 分页-每页记录数 |
| 311 | required: true |
| 312 | schema: |
| 313 | type: integer |
| 314 | format: int32 |
| 315 | default: 20 |
| 316 | - name: 'mapBean[roleCode]' |
| 317 | in: query |
| 318 | description: 查询条件-角色代码 |
| 319 | required: false |
| 320 | schema: |
| 321 | type: string |
| 322 | - name: 'mapBean[roleName]' |
| 323 | in: query |
| 324 | description: 查询条件-角色名称 |
| 325 | required: false |
| 326 | schema: |
| 327 | type: string |
| 328 | - name: 'mapBean[roleStatus]' |
| 329 | in: query |
| 330 | description: 查询条件-角色状态(1 启用,0 停用) |
| 331 | required: false |
| 332 | schema: |
| 333 | type: string |
| 334 | responses: |
| 335 | '200': |
| 336 | description: 用户的关联角色列表 |
| 337 | content: |
| 338 | application/json: |
| 339 | schema: |
| 340 | $ref: '#/components/schemas/UserRolePager' |
| 341 | default: |
| 342 | description: unexpected error |
| 343 | content: |
| 344 | application/json: |
| 345 | schema: |
| 346 | $ref: '#/components/schemas/Error' |
| 347 | post: |
| 348 | summary: 关联用户的角色 |
| 349 | operationId: admin-users-relateRoles |
| 350 | tags: |
| 351 | - Api1AdminUserController |
| 352 | parameters: |
| 353 | - name: id |
| 354 | in: path |
| 355 | required: true |
| 356 | description: 用户ID |
| 357 | schema: |
| 358 | type: string |
| 359 | requestBody: |
| 360 | content: |
| 361 | application/json: |
| 362 | schema: |
| 363 | $ref: '#/components/schemas/UserRoles' |
| 364 | responses: |
| 365 | '200': |
| 366 | description: 设置成功 |
| 367 | content: |
| 368 | application/json: |
| 369 | schema: |
| 370 | $ref: '#/components/schemas/Success' |
| 371 | examples: |
| 372 | success: |
| 373 | value: { |
| 374 | "success": "info.set.success" |
| 375 | } |
| 376 | default: |
| 377 | description: unexpected error |
| 378 | content: |
| 379 | application/json: |
| 380 | schema: |
| 381 | $ref: '#/components/schemas/Error' |
| 382 | '/admin/groups': |
| 383 | get: |
| 384 | summary: 查询用户组 |
| 385 | operationId: admin-groups-list |
| 386 | tags: |
| 387 | - Api1AdminGroupController |
| 388 | parameters: |
| 389 | - name: pageIndex |
| 390 | in: query |
| 391 | description: 分页-页码 |
| 392 | required: true |
| 393 | schema: |
| 394 | type: integer |
| 395 | format: int32 |
| 396 | default: 0 |
| 397 | - name: pageSize |
| 398 | in: query |
| 399 | description: 分页-每页记录数 |
| 400 | required: true |
| 401 | schema: |
| 402 | type: integer |
| 403 | format: int32 |
| 404 | default: 20 |
| 405 | - name: 'mapBean[code]' |
| 406 | in: query |
| 407 | description: 查询条件-代码 |
| 408 | required: false |
| 409 | schema: |
| 410 | type: string |
| 411 | - name: 'mapBean[name]' |
| 412 | in: query |
| 413 | description: 查询条件-名称 |
| 414 | required: false |
| 415 | schema: |
| 416 | type: string |
| 417 | - name: 'mapBean[status]' |
| 418 | in: query |
| 419 | description: 查询条件-状态(1 启用,0 停用) |
| 420 | required: false |
| 421 | schema: |
| 422 | type: string |
| 423 | responses: |
| 424 | '200': |
| 425 | description: 用户组列表 |
| 426 | content: |
| 427 | application/json: |
| 428 | schema: |
| 429 | $ref: '#/components/schemas/GroupPager' |
| 430 | default: |
| 431 | description: unexpected error |
| 432 | content: |
| 433 | application/json: |
| 434 | schema: |
| 435 | $ref: '#/components/schemas/Error' |
| 436 | post: |
| 437 | summary: 创建用户组 |
| 438 | operationId: admin-groups-create |
| 439 | tags: |
| 440 | - Api1AdminGroupController |
| 441 | requestBody: |
| 442 | content: |
| 443 | application/json: |
| 444 | schema: |
| 445 | $ref: '#/components/schemas/Group' |
| 446 | examples: |
| 447 | test1: |
| 448 | value: { |
| 449 | "companyId": "1", |
| 450 | "deleted": false, |
| 451 | "addAccount": "admin", |
| 452 | "code": "group1", |
| 453 | "name": "测试组1", |
| 454 | "memo": "", |
| 455 | "status": "1" |
| 456 | } |
| 457 | responses: |
| 458 | '200': |
| 459 | description: 创建成功 |
| 460 | content: |
| 461 | application/json: |
| 462 | schema: |
| 463 | $ref: '#/components/schemas/Success' |
| 464 | examples: |
| 465 | success: |
| 466 | value: |
| 467 | success: info.create.success |
| 468 | default: |
| 469 | description: unexpected error |
| 470 | content: |
| 471 | application/json: |
| 472 | schema: |
| 473 | $ref: '#/components/schemas/Error' |
| 474 | put: |
| 475 | summary: 修改用户组 |
| 476 | operationId: admin-groups-update |
| 477 | tags: |
| 478 | - Api1AdminGroupController |
| 479 | requestBody: |
| 480 | content: |
| 481 | application/json: |
| 482 | schema: |
| 483 | $ref: '#/components/schemas/Group' |
| 484 | examples: |
| 485 | test1: |
| 486 | value: { |
| 487 | "id": "1", |
| 488 | "status": "0" |
| 489 | } |
| 490 | responses: |
| 491 | '200': |
| 492 | description: 修改成功 |
| 493 | content: |
| 494 | application/json: |
| 495 | schema: |
| 496 | $ref: '#/components/schemas/Success' |
| 497 | examples: |
| 498 | success: |
| 499 | value: |
| 500 | success: info.update.success |
| 501 | default: |
| 502 | description: unexpected error |
| 503 | content: |
| 504 | application/json: |
| 505 | schema: |
| 506 | $ref: '#/components/schemas/Error' |
| 507 | '/admin/groups/{id}': |
| 508 | get: |
| 509 | summary: 根据ID获取用户组 |
| 510 | operationId: admin-groups-get |
| 511 | tags: |
| 512 | - Api1AdminGroupController |
| 513 | parameters: |
| 514 | - name: id |
| 515 | in: path |
| 516 | required: true |
| 517 | description: 用户组ID |
| 518 | schema: |
| 519 | type: string |
| 520 | responses: |
| 521 | '200': |
| 522 | description: Expected response to a valid request |
| 523 | content: |
| 524 | application/json: |
| 525 | schema: |
| 526 | $ref: '#/components/schemas/Group' |
| 527 | default: |
| 528 | description: unexpected error |
| 529 | content: |
| 530 | application/json: |
| 531 | schema: |
| 532 | $ref: '#/components/schemas/Error' |
| 533 | delete: |
| 534 | summary: 根据ID删除用户组 |
| 535 | operationId: admin-groups-delete |
| 536 | tags: |
| 537 | - Api1AdminGroupController |
| 538 | parameters: |
| 539 | - name: id |
| 540 | in: path |
| 541 | required: true |
| 542 | description: 用户组ID |
| 543 | schema: |
| 544 | type: string |
| 545 | responses: |
| 546 | '200': |
| 547 | description: Expected response to a valid request |
| 548 | content: |
| 549 | application/json: |
| 550 | schema: |
| 551 | $ref: '#/components/schemas/Success' |
| 552 | examples: |
| 553 | success: |
| 554 | value: |
| 555 | success: info.delete.success |
| 556 | default: |
| 557 | description: unexpected error |
| 558 | content: |
| 559 | application/json: |
| 560 | schema: |
| 561 | $ref: '#/components/schemas/Error' |
| 562 | '/admin/groups/{id}/users': |
| 563 | get: |
| 564 | summary: 根据ID获取用户组的关联用户 |
| 565 | operationId: admin-groups-groupUsers |
| 566 | tags: |
| 567 | - Api1AdminGroupController |
| 568 | parameters: |
| 569 | - name: id |
| 570 | in: path |
| 571 | required: true |
| 572 | description: 用户ID |
| 573 | schema: |
| 574 | type: string |
| 575 | - name: pageIndex |
| 576 | in: query |
| 577 | description: 分页-页码 |
| 578 | required: true |
| 579 | schema: |
| 580 | type: integer |
| 581 | format: int32 |
| 582 | default: 0 |
| 583 | - name: pageSize |
| 584 | in: query |
| 585 | description: 分页-每页记录数 |
| 586 | required: true |
| 587 | schema: |
| 588 | type: integer |
| 589 | format: int32 |
| 590 | default: 20 |
| 591 | - name: 'mapBean[userUsername]' |
| 592 | in: query |
| 593 | description: 查询条件-用户名 |
| 594 | required: false |
| 595 | schema: |
| 596 | type: string |
| 597 | - name: 'mapBean[userName]' |
| 598 | in: query |
| 599 | description: 查询条件-用户姓名 |
| 600 | required: false |
| 601 | schema: |
| 602 | type: string |
| 603 | - name: 'mapBean[userStatus]' |
| 604 | in: query |
| 605 | description: 查询条件-用户状态(1 启用,0 停用) |
| 606 | required: false |
| 607 | schema: |
| 608 | type: string |
| 609 | responses: |
| 610 | '200': |
| 611 | description: 用户组的关联用户列表 |
| 612 | content: |
| 613 | application/json: |
| 614 | schema: |
| 615 | $ref: '#/components/schemas/GroupUserPager' |
| 616 | default: |
| 617 | description: unexpected error |
| 618 | content: |
| 619 | application/json: |
| 620 | schema: |
| 621 | $ref: '#/components/schemas/Error' |
| 622 | post: |
| 623 | summary: 关联用户组的用户 |
| 624 | operationId: admin-groups-relateUsers |
| 625 | tags: |
| 626 | - Api1AdminGroupController |
| 627 | parameters: |
| 628 | - name: id |
| 629 | in: path |
| 630 | required: true |
| 631 | description: 用户ID |
| 632 | schema: |
| 633 | type: string |
| 634 | requestBody: |
| 635 | content: |
| 636 | application/json: |
| 637 | schema: |
| 638 | $ref: '#/components/schemas/GroupUsers' |
| 639 | responses: |
| 640 | '200': |
| 641 | description: 设置成功 |
| 642 | content: |
| 643 | application/json: |
| 644 | schema: |
| 645 | $ref: '#/components/schemas/Success' |
| 646 | examples: |
| 647 | success: |
| 648 | value: { |
| 649 | "success": "info.set.success" |
| 650 | } |
| 651 | default: |
| 652 | description: unexpected error |
| 653 | content: |
| 654 | application/json: |
| 655 | schema: |
| 656 | $ref: '#/components/schemas/Error' |
| 657 | '/admin/groups/{id}/roles': |
| 658 | get: |
| 659 | summary: 根据ID获取用户组的关联角色 |
| 660 | operationId: admin-groups-groupRoles |
| 661 | tags: |
| 662 | - Api1AdminGroupController |
| 663 | parameters: |
| 664 | - name: id |
| 665 | in: path |
| 666 | required: true |
| 667 | description: 用户ID |
| 668 | schema: |
| 669 | type: string |
| 670 | - name: pageIndex |
| 671 | in: query |
| 672 | description: 分页-页码 |
| 673 | required: true |
| 674 | schema: |
| 675 | type: integer |
| 676 | format: int32 |
| 677 | default: 0 |
| 678 | - name: pageSize |
| 679 | in: query |
| 680 | description: 分页-每页记录数 |
| 681 | required: true |
| 682 | schema: |
| 683 | type: integer |
| 684 | format: int32 |
| 685 | default: 20 |
| 686 | - name: 'mapBean[roleCode]' |
| 687 | in: query |
| 688 | description: 查询条件-角色代码 |
| 689 | required: false |
| 690 | schema: |
| 691 | type: string |
| 692 | - name: 'mapBean[roleName]' |
| 693 | in: query |
| 694 | description: 查询条件-角色名称 |
| 695 | required: false |
| 696 | schema: |
| 697 | type: string |
| 698 | - name: 'mapBean[roleStatus]' |
| 699 | in: query |
| 700 | description: 查询条件-角色状态(1 启用,0 停用) |
| 701 | required: false |
| 702 | schema: |
| 703 | type: string |
| 704 | responses: |
| 705 | '200': |
| 706 | description: 用户组的关联角色列表 |
| 707 | content: |
| 708 | application/json: |
| 709 | schema: |
| 710 | $ref: '#/components/schemas/GroupRolePager' |
| 711 | default: |
| 712 | description: unexpected error |
| 713 | content: |
| 714 | application/json: |
| 715 | schema: |
| 716 | $ref: '#/components/schemas/Error' |
| 717 | post: |
| 718 | summary: 关联用户组的角色 |
| 719 | operationId: admin-groups-relateRoles |
| 720 | tags: |
| 721 | - Api1AdminGroupController |
| 722 | parameters: |
| 723 | - name: id |
| 724 | in: path |
| 725 | required: true |
| 726 | description: 用户ID |
| 727 | schema: |
| 728 | type: string |
| 729 | requestBody: |
| 730 | content: |
| 731 | application/json: |
| 732 | schema: |
| 733 | $ref: '#/components/schemas/GroupRoles' |
| 734 | responses: |
| 735 | '200': |
| 736 | description: 设置成功 |
| 737 | content: |
| 738 | application/json: |
| 739 | schema: |
| 740 | $ref: '#/components/schemas/Success' |
| 741 | examples: |
| 742 | success: |
| 743 | value: { |
| 744 | "success": "info.set.success" |
| 745 | } |
| 746 | default: |
| 747 | description: unexpected error |
| 748 | content: |
| 749 | application/json: |
| 750 | schema: |
| 751 | $ref: '#/components/schemas/Error' |
| 752 | '/admin/roles': |
| 753 | get: |
| 754 | summary: 查询角色 |
| 755 | operationId: admin-roles-list |
| 756 | tags: |
| 757 | - Api1AdminRoleController |
| 758 | parameters: |
| 759 | - name: pageIndex |
| 760 | in: query |
| 761 | description: 分页-页码 |
| 762 | required: true |
| 763 | schema: |
| 764 | type: integer |
| 765 | format: int32 |
| 766 | default: 0 |
| 767 | - name: pageSize |
| 768 | in: query |
| 769 | description: 分页-每页记录数 |
| 770 | required: true |
| 771 | schema: |
| 772 | type: integer |
| 773 | format: int32 |
| 774 | default: 20 |
| 775 | - name: 'mapBean[code]' |
| 776 | in: query |
| 777 | description: 查询条件-代码 |
| 778 | required: false |
| 779 | schema: |
| 780 | type: string |
| 781 | - name: 'mapBean[name]' |
| 782 | in: query |
| 783 | description: 查询条件-名称 |
| 784 | required: false |
| 785 | schema: |
| 786 | type: string |
| 787 | - name: 'mapBean[status]' |
| 788 | in: query |
| 789 | description: 查询条件-状态(1 启用,0 停用) |
| 790 | required: false |
| 791 | schema: |
| 792 | type: string |
| 793 | responses: |
| 794 | '200': |
| 795 | description: 角色列表 |
| 796 | content: |
| 797 | application/json: |
| 798 | schema: |
| 799 | $ref: '#/components/schemas/RolePager' |
| 800 | default: |
| 801 | description: unexpected error |
| 802 | content: |
| 803 | application/json: |
| 804 | schema: |
| 805 | $ref: '#/components/schemas/Error' |
| 806 | post: |
| 807 | summary: 创建角色 |
| 808 | operationId: admin-roles-create |
| 809 | tags: |
| 810 | - Api1AdminRoleController |
| 811 | requestBody: |
| 812 | content: |
| 813 | application/json: |
| 814 | schema: |
| 815 | $ref: '#/components/schemas/Role' |
| 816 | examples: |
| 817 | test1: |
| 818 | value: { |
| 819 | "companyId": "1", |
| 820 | "deleted": false, |
| 821 | "addAccount": "admin", |
| 822 | "code": "role1", |
| 823 | "name": "测试角色1", |
| 824 | "memo": "", |
| 825 | "status": "1" |
| 826 | } |
| 827 | responses: |
| 828 | '200': |
| 829 | description: 创建成功 |
| 830 | content: |
| 831 | application/json: |
| 832 | schema: |
| 833 | $ref: '#/components/schemas/Success' |
| 834 | examples: |
| 835 | success: |
| 836 | value: |
| 837 | success: info.create.success |
| 838 | default: |
| 839 | description: unexpected error |
| 840 | content: |
| 841 | application/json: |
| 842 | schema: |
| 843 | $ref: '#/components/schemas/Error' |
| 844 | put: |
| 845 | summary: 修改角色 |
| 846 | operationId: admin-roles-update |
| 847 | tags: |
| 848 | - Api1AdminRoleController |
| 849 | requestBody: |
| 850 | content: |
| 851 | application/json: |
| 852 | schema: |
| 853 | $ref: '#/components/schemas/Role' |
| 854 | examples: |
| 855 | test1: |
| 856 | value: { |
| 857 | "id": "1", |
| 858 | "status": "0" |
| 859 | } |
| 860 | responses: |
| 861 | '200': |
| 862 | description: 修改成功 |
| 863 | content: |
| 864 | application/json: |
| 865 | schema: |
| 866 | $ref: '#/components/schemas/Success' |
| 867 | examples: |
| 868 | success: |
| 869 | value: |
| 870 | success: info.update.success |
| 871 | default: |
| 872 | description: unexpected error |
| 873 | content: |
| 874 | application/json: |
| 875 | schema: |
| 876 | $ref: '#/components/schemas/Error' |
| 877 | '/admin/roles/{id}': |
| 878 | get: |
| 879 | summary: 根据ID获取角色 |
| 880 | operationId: admin-roles-get |
| 881 | tags: |
| 882 | - Api1AdminRoleController |
| 883 | parameters: |
| 884 | - name: id |
| 885 | in: path |
| 886 | required: true |
| 887 | description: 角色ID |
| 888 | schema: |
| 889 | type: string |
| 890 | responses: |
| 891 | '200': |
| 892 | description: Expected response to a valid request |
| 893 | content: |
| 894 | application/json: |
| 895 | schema: |
| 896 | $ref: '#/components/schemas/Role' |
| 897 | default: |
| 898 | description: unexpected error |
| 899 | content: |
| 900 | application/json: |
| 901 | schema: |
| 902 | $ref: '#/components/schemas/Error' |
| 903 | delete: |
| 904 | summary: 根据ID删除角色 |
| 905 | operationId: admin-roles-delete |
| 906 | tags: |
| 907 | - Api1AdminRoleController |
| 908 | parameters: |
| 909 | - name: id |
| 910 | in: path |
| 911 | required: true |
| 912 | description: 角色ID |
| 913 | schema: |
| 914 | type: string |
| 915 | responses: |
| 916 | '200': |
| 917 | description: Expected response to a valid request |
| 918 | content: |
| 919 | application/json: |
| 920 | schema: |
| 921 | $ref: '#/components/schemas/Success' |
| 922 | examples: |
| 923 | success: |
| 924 | value: |
| 925 | success: info.delete.success |
| 926 | default: |
| 927 | description: unexpected error |
| 928 | content: |
| 929 | application/json: |
| 930 | schema: |
| 931 | $ref: '#/components/schemas/Error' |
| 932 | '/admin/roles/{id}/users': |
| 933 | get: |
| 934 | summary: 根据ID获取角色的关联用户 |
| 935 | operationId: admin-roles-roleUsers |
| 936 | tags: |
| 937 | - Api1AdminRoleController |
| 938 | parameters: |
| 939 | - name: id |
| 940 | in: path |
| 941 | required: true |
| 942 | description: 角色ID |
| 943 | schema: |
| 944 | type: string |
| 945 | - name: pageIndex |
| 946 | in: query |
| 947 | description: 分页-页码 |
| 948 | required: true |
| 949 | schema: |
| 950 | type: integer |
| 951 | format: int32 |
| 952 | default: 0 |
| 953 | - name: pageSize |
| 954 | in: query |
| 955 | description: 分页-每页记录数 |
| 956 | required: true |
| 957 | schema: |
| 958 | type: integer |
| 959 | format: int32 |
| 960 | default: 20 |
| 961 | - name: 'mapBean[userUsername]' |
| 962 | in: query |
| 963 | description: 查询条件-用户名 |
| 964 | required: false |
| 965 | schema: |
| 966 | type: string |
| 967 | - name: 'mapBean[userName]' |
| 968 | in: query |
| 969 | description: 查询条件-用户姓名 |
| 970 | required: false |
| 971 | schema: |
| 972 | type: string |
| 973 | - name: 'mapBean[userStatus]' |
| 974 | in: query |
| 975 | description: 查询条件-用户状态(1 启用,0 停用) |
| 976 | required: false |
| 977 | schema: |
| 978 | type: string |
| 979 | responses: |
| 980 | '200': |
| 981 | description: 角色的关联用户列表 |
| 982 | content: |
| 983 | application/json: |
| 984 | schema: |
| 985 | $ref: '#/components/schemas/UserRolePager' |
| 986 | default: |
| 987 | description: unexpected error |
| 988 | content: |
| 989 | application/json: |
| 990 | schema: |
| 991 | $ref: '#/components/schemas/Error' |
| 992 | post: |
| 993 | summary: 关联角色的用户 |
| 994 | operationId: admin-roles-relateUsers |
| 995 | tags: |
| 996 | - Api1AdminRoleController |
| 997 | parameters: |
| 998 | - name: id |
| 999 | in: path |
| 1000 | required: true |
| 1001 | description: 角色ID |
| 1002 | schema: |
| 1003 | type: string |
| 1004 | requestBody: |
| 1005 | content: |
| 1006 | application/json: |
| 1007 | schema: |
| 1008 | $ref: '#/components/schemas/UserRoles' |
| 1009 | responses: |
| 1010 | '200': |
| 1011 | description: 设置成功 |
| 1012 | content: |
| 1013 | application/json: |
| 1014 | schema: |
| 1015 | $ref: '#/components/schemas/Success' |
| 1016 | examples: |
| 1017 | success: |
| 1018 | value: { |
| 1019 | "success": "info.set.success" |
| 1020 | } |
| 1021 | default: |
| 1022 | description: unexpected error |
| 1023 | content: |
| 1024 | application/json: |
| 1025 | schema: |
| 1026 | $ref: '#/components/schemas/Error' |
| 1027 | '/admin/roles/{id}/groups': |
| 1028 | get: |
| 1029 | summary: 根据ID获取角色的关联用户组 |
| 1030 | operationId: admin-roles-roleGroups |
| 1031 | tags: |
| 1032 | - Api1AdminRoleController |
| 1033 | parameters: |
| 1034 | - name: id |
| 1035 | in: path |
| 1036 | required: true |
| 1037 | description: 角色ID |
| 1038 | schema: |
| 1039 | type: string |
| 1040 | - name: pageIndex |
| 1041 | in: query |
| 1042 | description: 分页-页码 |
| 1043 | required: true |
| 1044 | schema: |
| 1045 | type: integer |
| 1046 | format: int32 |
| 1047 | default: 0 |
| 1048 | - name: pageSize |
| 1049 | in: query |
| 1050 | description: 分页-每页记录数 |
| 1051 | required: true |
| 1052 | schema: |
| 1053 | type: integer |
| 1054 | format: int32 |
| 1055 | default: 20 |
| 1056 | - name: 'mapBean[groupCode]' |
| 1057 | in: query |
| 1058 | description: 查询条件-用户组代码 |
| 1059 | required: false |
| 1060 | schema: |
| 1061 | type: string |
| 1062 | - name: 'mapBean[groupName]' |
| 1063 | in: query |
| 1064 | description: 查询条件-用户组名称 |
| 1065 | required: false |
| 1066 | schema: |
| 1067 | type: string |
| 1068 | - name: 'mapBean[groupStatus]' |
| 1069 | in: query |
| 1070 | description: 查询条件-用户组状态(1 启用,0 停用) |
| 1071 | required: false |
| 1072 | schema: |
| 1073 | type: string |
| 1074 | responses: |
| 1075 | '200': |
| 1076 | description: 角色的关联用户组列表 |
| 1077 | content: |
| 1078 | application/json: |
| 1079 | schema: |
| 1080 | $ref: '#/components/schemas/GroupRolePager' |
| 1081 | default: |
| 1082 | description: unexpected error |
| 1083 | content: |
| 1084 | application/json: |
| 1085 | schema: |
| 1086 | $ref: '#/components/schemas/Error' |
| 1087 | post: |
| 1088 | summary: 关联角色的用户组 |
| 1089 | operationId: admin-roles-relateGroups |
| 1090 | tags: |
| 1091 | - Api1AdminRoleController |
| 1092 | parameters: |
| 1093 | - name: id |
| 1094 | in: path |
| 1095 | required: true |
| 1096 | description: 角色ID |
| 1097 | schema: |
| 1098 | type: string |
| 1099 | requestBody: |
| 1100 | content: |
| 1101 | application/json: |
| 1102 | schema: |
| 1103 | $ref: '#/components/schemas/GroupRoles' |
| 1104 | responses: |
| 1105 | '200': |
| 1106 | description: 设置成功 |
| 1107 | content: |
| 1108 | application/json: |
| 1109 | schema: |
| 1110 | $ref: '#/components/schemas/Success' |
| 1111 | examples: |
| 1112 | success: |
| 1113 | value: { |
| 1114 | "success": "info.set.success" |
| 1115 | } |
| 1116 | default: |
| 1117 | description: unexpected error |
| 1118 | content: |
| 1119 | application/json: |
| 1120 | schema: |
| 1121 | $ref: '#/components/schemas/Error' |
| 1122 | components: |
| 1123 | schemas: |
| 1124 | Error: |
| 1125 | required: |
| 1126 | - code |
| 1127 | - message |
| 1128 | properties: |
| 1129 | code: |
| 1130 | type: integer |
| 1131 | format: int32 |
| 1132 | message: |
| 1133 | type: string |
| 1134 | Success: |
| 1135 | properties: |
| 1136 | success: |
| 1137 | type: string |
| 1138 | PagerResponseModel: |
| 1139 | properties: |
| 1140 | pageIndex: |
| 1141 | type: integer |
| 1142 | format: int32 |
| 1143 | pageSize: |
| 1144 | type: integer |
| 1145 | format: int32 |
| 1146 | currentItemCount: |
| 1147 | type: integer |
| 1148 | format: int32 |
| 1149 | pageCount: |
| 1150 | type: integer |
| 1151 | format: int32 |
| 1152 | recordCount: |
| 1153 | type: integer |
| 1154 | format: int64 |
| 1155 | BaseDomain: |
| 1156 | properties: |
| 1157 | id: |
| 1158 | description: ID |
| 1159 | type: string |
| 1160 | companyId: |
| 1161 | description: 'Company ID, 固定 1' |
| 1162 | type: string |
| 1163 | deleted: |
| 1164 | description: 是否删除 |
| 1165 | type: boolean |
| 1166 | default: false |
| 1167 | addAccount: |
| 1168 | description: 创建人 |
| 1169 | type: string |
| 1170 | addTime: |
| 1171 | description: 创建时间 |
| 1172 | type: string |
| 1173 | format: date |
| 1174 | editAccount: |
| 1175 | description: 修改人 |
| 1176 | type: string |
| 1177 | editTime: |
| 1178 | description: 修改时间 |
| 1179 | type: string |
| 1180 | format: date |
| 1181 | deleteAccount: |
| 1182 | description: 删除人 |
| 1183 | type: string |
| 1184 | deleteTime: |
| 1185 | description: 删除时间 |
| 1186 | type: string |
| 1187 | format: date |
| 1188 | User: |
| 1189 | allOf: |
| 1190 | - $ref: '#/components/schemas/BaseDomain' |
| 1191 | - type: object |
| 1192 | properties: |
| 1193 | username: |
| 1194 | description: 用户名 |
| 1195 | type: string |
| 1196 | password: |
| 1197 | description: 密码 |
| 1198 | type: string |
| 1199 | format: password |
| 1200 | enabled: |
| 1201 | description: 是否可用,1 可用,0 不可用,默认:1 |
| 1202 | type: boolean |
| 1203 | default: true |
| 1204 | accountNonExpired: |
| 1205 | description: 账号未过期,1 未过期,0 过期,默认:1 |
| 1206 | type: boolean |
| 1207 | default: true |
| 1208 | accountNonLocked: |
| 1209 | description: 账号未锁定,1 未锁定,0 锁定,默认:1 |
| 1210 | type: boolean |
| 1211 | default: true |
| 1212 | credentialsNonExpired: |
| 1213 | description: 密码未过期,1 未过期,0 过期,默认:1 |
| 1214 | type: boolean |
| 1215 | default: true |
| 1216 | name: |
| 1217 | description: 姓名 |
| 1218 | type: string |
| 1219 | status: |
| 1220 | description: 状态(1 启用,0 停用) |
| 1221 | type: string |
| 1222 | mobile: |
| 1223 | description: 登录手机 |
| 1224 | type: string |
| 1225 | email: |
| 1226 | description: 登录邮箱 |
| 1227 | type: string |
| 1228 | UserPager: |
| 1229 | allOf: |
| 1230 | - $ref: '#/components/schemas/PagerResponseModel' |
| 1231 | - type: object |
| 1232 | properties: |
| 1233 | items: |
| 1234 | type: array |
| 1235 | items: |
| 1236 | $ref: '#/components/schemas/User' |
| 1237 | Group: |
| 1238 | allOf: |
| 1239 | - $ref: '#/components/schemas/BaseDomain' |
| 1240 | - type: object |
| 1241 | properties: |
| 1242 | code: |
| 1243 | description: 代码 |
| 1244 | type: string |
| 1245 | name: |
| 1246 | description: 名称 |
| 1247 | type: string |
| 1248 | memo: |
| 1249 | description: 备注 |
| 1250 | type: string |
| 1251 | status: |
| 1252 | description: 状态(1 启用,0 停用) |
| 1253 | type: string |
| 1254 | GroupPager: |
| 1255 | allOf: |
| 1256 | - $ref: '#/components/schemas/PagerResponseModel' |
| 1257 | - type: object |
| 1258 | properties: |
| 1259 | items: |
| 1260 | type: array |
| 1261 | items: |
| 1262 | $ref: '#/components/schemas/Group' |
| 1263 | Role: |
| 1264 | allOf: |
| 1265 | - $ref: '#/components/schemas/BaseDomain' |
| 1266 | - type: object |
| 1267 | properties: |
| 1268 | code: |
| 1269 | description: 代码 |
| 1270 | type: string |
| 1271 | name: |
| 1272 | description: 名称 |
| 1273 | type: string |
| 1274 | memo: |
| 1275 | description: 备注 |
| 1276 | type: string |
| 1277 | status: |
| 1278 | description: 状态(1 启用,0 停用) |
| 1279 | type: string |
| 1280 | RolePager: |
| 1281 | allOf: |
| 1282 | - $ref: '#/components/schemas/PagerResponseModel' |
| 1283 | - type: object |
| 1284 | properties: |
| 1285 | items: |
| 1286 | type: array |
| 1287 | items: |
| 1288 | $ref: '#/components/schemas/Role' |
| 1289 | GroupUser: |
| 1290 | allOf: |
| 1291 | - $ref: '#/components/schemas/BaseDomain' |
| 1292 | - type: object |
| 1293 | properties: |
| 1294 | groupId: |
| 1295 | description: 用户组ID |
| 1296 | type: string |
| 1297 | username: |
| 1298 | description: 用户名 |
| 1299 | type: string |
| 1300 | GroupUserPager: |
| 1301 | allOf: |
| 1302 | - $ref: '#/components/schemas/PagerResponseModel' |
| 1303 | - type: object |
| 1304 | properties: |
| 1305 | items: |
| 1306 | type: array |
| 1307 | items: |
| 1308 | $ref: '#/components/schemas/GroupUser' |
| 1309 | GroupUsers: |
| 1310 | properties: |
| 1311 | groupUsers: |
| 1312 | type: array |
| 1313 | items: |
| 1314 | $ref: '#/components/schemas/GroupUser' |
| 1315 | UserRole: |
| 1316 | allOf: |
| 1317 | - $ref: '#/components/schemas/BaseDomain' |
| 1318 | - type: object |
| 1319 | properties: |
| 1320 | username: |
| 1321 | description: 用户名 |
| 1322 | type: string |
| 1323 | rolecode: |
| 1324 | description: 角色代码 |
| 1325 | type: string |
| 1326 | UserRolePager: |
| 1327 | allOf: |
| 1328 | - $ref: '#/components/schemas/PagerResponseModel' |
| 1329 | - type: object |
| 1330 | properties: |
| 1331 | items: |
| 1332 | type: array |
| 1333 | items: |
| 1334 | $ref: '#/components/schemas/UserRole' |
| 1335 | UserRoles: |
| 1336 | properties: |
| 1337 | userRoles: |
| 1338 | type: array |
| 1339 | items: |
| 1340 | $ref: '#/components/schemas/UserRole' |
| 1341 | GroupRole: |
| 1342 | allOf: |
| 1343 | - $ref: '#/components/schemas/BaseDomain' |
| 1344 | - type: object |
| 1345 | properties: |
| 1346 | groupId: |
| 1347 | description: 用户组ID |
| 1348 | type: string |
| 1349 | rolecode: |
| 1350 | description: 角色代码 |
| 1351 | type: string |
| 1352 | GroupRolePager: |
| 1353 | allOf: |
| 1354 | - $ref: '#/components/schemas/PagerResponseModel' |
| 1355 | - type: object |
| 1356 | properties: |
| 1357 | items: |
| 1358 | type: array |
| 1359 | items: |
| 1360 | $ref: '#/components/schemas/GroupRole' |
| 1361 | GroupRoles: |
| 1362 | properties: |
| 1363 | groupRoles: |
| 1364 | type: array |
| 1365 | items: |
| 1366 | $ref: '#/components/schemas/GroupRole' |