{ "openapi": "3.1.0", "info": { "title": "系统管理", "description": "系统管理—相关接口文档", "version": "1.0-SNAPSHOT" }, "paths": { "/user": { "post": { "tags": ["用户管理API"], "summary": "新增用户", "operationId": "add", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SysUser" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/AjaxResult" } } } } } } } }, "components": { "schemas": { "SysUser": { "type": "object", "properties": { "createIdBy": { "type": "integer", "format": "int64" }, "createBy": { "type": "string" }, "createTime": { "type": "string", "format": "date-time" }, "updateIdBy": { "type": "integer", "format": "int64" }, "updateBy": { "type": "string" }, "updateTime": { "type": "string", "format": "date-time" }, "remark": { "type": "string" }, "params": { "type": "object", "additionalProperties": {} }, "userId": { "type": "integer", "format": "int64", "description": "用户ID" }, "deptId": { "type": "integer", "format": "int64", "description": "部门ID" }, "userName": { "type": "string", "description": "用户账号", "maxLength": 30, "minLength": 0 }, "nickName": { "type": "string", "description": "用户昵称", "maxLength": 30, "minLength": 0 }, "userType": { "type": "string", "description": "用户类型(00系统用户)" }, "email": { "type": "string", "format": "email", "description": "用户邮箱", "maxLength": 50, "minLength": 0 }, "phonenumber": { "type": "string", "description": "手机号码", "maxLength": 11, "minLength": 0 }, "jobnumber": { "type": "string", "description": "工号", "maxLength": 50, "minLength": 0 }, "sex": { "type": "string", "description": "用户性别,0=男,1=女,2=未知" }, "avatar": { "type": "string", "description": "用户头像" }, "appletImg": { "type": "string", "description": "小程序码" }, "password": { "type": "string", "description": "密码" }, "status": { "type": "string", "description": "帐号状态(0正常 1停用)" }, "delFlag": { "type": "string", "description": "删除标志(0代表存在 2代表删除)" }, "loginIp": { "type": "string", "description": "最后登录IP" }, "loginDate": { "type": "string", "format": "date-time", "description": "最后登录时间" }, "dept": { "$ref": "#/components/schemas/DeptInfo", "description": "部门对象" }, "roles": { "type": "array", "description": "角色对象", "items": { "$ref": "#/components/schemas/SysRole" } }, "roleIds": { "type": "array", "description": "角色组", "items": { "type": "integer", "format": "int64" } }, "roleId": { "type": "integer", "format": "int64", "description": "角色ID" } }, "required": ["userName"] }, "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"] }, "SysRole": { "type": "object", "description": "角色对象", "properties": { "createIdBy": { "type": "integer", "format": "int64" }, "createBy": { "type": "string" }, "createTime": { "type": "string", "format": "date-time" }, "updateIdBy": { "type": "integer", "format": "int64" }, "updateBy": { "type": "string" }, "updateTime": { "type": "string", "format": "date-time" }, "remark": { "type": "string" }, "params": { "type": "object", "additionalProperties": {} }, "roleId": { "type": "integer", "format": "int64", "description": "角色ID" }, "roleName": { "type": "string", "description": "角色名称", "maxLength": 30, "minLength": 0 }, "roleKey": { "type": "string", "description": "角色权限", "maxLength": 100, "minLength": 0 }, "roleSort": { "type": "integer", "format": "int32", "description": "角色排序" }, "dataScope": { "type": "string", "description": "数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限;5:仅本人数据权限)" }, "menuCheckStrictly": { "type": "boolean", "description": "菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示)" }, "deptCheckStrictly": { "type": "boolean", "description": "部门树选择项是否关联显示(0:父子不互相关联显示 1:父子互相关联显示 )" }, "status": { "type": "string", "description": "角色状态(0正常 1停用)" }, "delFlag": { "type": "string", "description": "删除标志(0代表存在 2代表删除)" }, "flag": { "type": "boolean", "description": "用户是否存在此角色标识 默认不存在" }, "menuIds": { "type": "array", "description": "菜单组", "items": { "type": "integer", "format": "int64" } }, "deptIds": { "type": "array", "description": "部门组(数据权限)", "items": { "type": "integer", "format": "int64" } }, "permissions": { "type": "array", "description": "角色菜单权限", "items": { "type": "string" }, "uniqueItems": true } }, "required": ["roleName"] }, "AjaxResult": { "type": "object", "description": "接口返回对象", "properties": { "code": { "type": "integer", "format": "int32", "description": "状态码" }, "msg": { "type": "string", "description": "提示语" }, "data": { "description": "数据对象" } } } } } }