{ "openapi": "3.1.0", "info": { "title": "系统管理", "description": "系统管理—相关接口文档", "version": "1.0-SNAPSHOT" }, "paths": { "/dept": { "post": { "tags": ["部门管理API"], "summary": "新增部门", "operationId": "addDept", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeptInfo" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/AjaxResultLong" } } } } } } } }, "components": { "schemas": { "DeptInfo": { "type": "object", "properties": { "deptId": { "type": "integer", "format": "int64", "description": "部门ID" }, "parentId": { "type": "integer", "format": "int64", "description": "父部门ID" }, "ancestors": { "type": "string", "description": "祖级列表" }, "deptName": { "type": "string", "description": "部门名称", "maxLength": 30, "minLength": 0 }, "deptFullPathName": { "type": "string", "description": "部门名称(包含祖部门)" }, "orderNum": { "type": "integer", "format": "int32", "description": "显示顺序" }, "leader": { "type": "string", "description": "负责人" }, "phone": { "type": "string", "description": "联系电话", "maxLength": 11, "minLength": 0 }, "email": { "type": "string", "format": "email", "description": "邮箱", "maxLength": 50, "minLength": 0 }, "status": { "type": "string", "description": "状态标志(详见字典:系统开关)", "minLength": 1, "pattern": "^[01]$" }, "delFlag": { "type": "string", "description": "删除标志(详见字典:删除标志)" }, "createIdBy": { "type": "integer", "format": "int64", "description": "创建者ID" }, "createBy": { "type": "string", "description": "创建者" }, "createTime": { "type": "string", "format": "date-time", "description": "创建时间" }, "updateIdBy": { "type": "integer", "format": "int64", "description": "更新者ID" }, "updateBy": { "type": "string", "description": "更新者" }, "updateTime": { "type": "string", "format": "date-time", "description": "更新时间" }, "remark": { "type": "string", "description": "备注" }, "parentName": { "type": "string", "description": "父部门名称" }, "children": { "type": "array", "description": "子部门", "items": { "$ref": "#/components/schemas/DeptInfo" } } }, "required": ["deptName", "orderNum", "parentId", "status"] }, "AjaxResultLong": { "type": "object", "description": "接口返回对象", "properties": { "code": { "type": "integer", "format": "int32", "description": "状态码" }, "msg": { "type": "string", "description": "提示语" }, "data": { "type": "integer", "format": "int64", "description": "数据对象" } } } } } }