addUser.openapi.json 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "系统管理",
  5. "description": "系统管理—相关接口文档",
  6. "version": "1.0-SNAPSHOT"
  7. },
  8. "paths": {
  9. "/user": {
  10. "post": {
  11. "tags": ["用户管理API"],
  12. "summary": "新增用户",
  13. "operationId": "add",
  14. "requestBody": {
  15. "content": {
  16. "application/json": {
  17. "schema": {
  18. "$ref": "#/components/schemas/SysUser"
  19. }
  20. }
  21. },
  22. "required": true
  23. },
  24. "responses": {
  25. "200": {
  26. "description": "OK",
  27. "content": {
  28. "*/*": {
  29. "schema": {
  30. "$ref": "#/components/schemas/AjaxResult"
  31. }
  32. }
  33. }
  34. }
  35. }
  36. }
  37. }
  38. },
  39. "components": {
  40. "schemas": {
  41. "SysUser": {
  42. "type": "object",
  43. "properties": {
  44. "createIdBy": {
  45. "type": "integer",
  46. "format": "int64"
  47. },
  48. "createBy": {
  49. "type": "string"
  50. },
  51. "createTime": {
  52. "type": "string",
  53. "format": "date-time"
  54. },
  55. "updateIdBy": {
  56. "type": "integer",
  57. "format": "int64"
  58. },
  59. "updateBy": {
  60. "type": "string"
  61. },
  62. "updateTime": {
  63. "type": "string",
  64. "format": "date-time"
  65. },
  66. "remark": {
  67. "type": "string"
  68. },
  69. "params": {
  70. "type": "object",
  71. "additionalProperties": {}
  72. },
  73. "userId": {
  74. "type": "integer",
  75. "format": "int64",
  76. "description": "用户ID"
  77. },
  78. "deptId": {
  79. "type": "integer",
  80. "format": "int64",
  81. "description": "部门ID"
  82. },
  83. "userName": {
  84. "type": "string",
  85. "description": "用户账号",
  86. "maxLength": 30,
  87. "minLength": 0
  88. },
  89. "nickName": {
  90. "type": "string",
  91. "description": "用户昵称",
  92. "maxLength": 30,
  93. "minLength": 0
  94. },
  95. "userType": {
  96. "type": "string",
  97. "description": "用户类型(00系统用户)"
  98. },
  99. "email": {
  100. "type": "string",
  101. "format": "email",
  102. "description": "用户邮箱",
  103. "maxLength": 50,
  104. "minLength": 0
  105. },
  106. "phonenumber": {
  107. "type": "string",
  108. "description": "手机号码",
  109. "maxLength": 11,
  110. "minLength": 0
  111. },
  112. "jobnumber": {
  113. "type": "string",
  114. "description": "工号",
  115. "maxLength": 50,
  116. "minLength": 0
  117. },
  118. "sex": {
  119. "type": "string",
  120. "description": "用户性别,0=男,1=女,2=未知"
  121. },
  122. "avatar": {
  123. "type": "string",
  124. "description": "用户头像"
  125. },
  126. "appletImg": {
  127. "type": "string",
  128. "description": "小程序码"
  129. },
  130. "password": {
  131. "type": "string",
  132. "description": "密码"
  133. },
  134. "status": {
  135. "type": "string",
  136. "description": "帐号状态(0正常 1停用)"
  137. },
  138. "delFlag": {
  139. "type": "string",
  140. "description": "删除标志(0代表存在 2代表删除)"
  141. },
  142. "loginIp": {
  143. "type": "string",
  144. "description": "最后登录IP"
  145. },
  146. "loginDate": {
  147. "type": "string",
  148. "format": "date-time",
  149. "description": "最后登录时间"
  150. },
  151. "dept": {
  152. "$ref": "#/components/schemas/DeptInfo",
  153. "description": "部门对象"
  154. },
  155. "roles": {
  156. "type": "array",
  157. "description": "角色对象",
  158. "items": {
  159. "$ref": "#/components/schemas/SysRole"
  160. }
  161. },
  162. "roleIds": {
  163. "type": "array",
  164. "description": "角色组",
  165. "items": {
  166. "type": "integer",
  167. "format": "int64"
  168. }
  169. },
  170. "roleId": {
  171. "type": "integer",
  172. "format": "int64",
  173. "description": "角色ID"
  174. }
  175. },
  176. "required": ["userName"]
  177. },
  178. "DeptInfo": {
  179. "type": "object",
  180. "properties": {
  181. "deptId": {
  182. "type": "integer",
  183. "format": "int64",
  184. "description": "部门ID"
  185. },
  186. "parentId": {
  187. "type": "integer",
  188. "format": "int64",
  189. "description": "父部门ID"
  190. },
  191. "ancestors": {
  192. "type": "string",
  193. "description": "祖级列表"
  194. },
  195. "deptName": {
  196. "type": "string",
  197. "description": "部门名称",
  198. "maxLength": 30,
  199. "minLength": 0
  200. },
  201. "deptFullPathName": {
  202. "type": "string",
  203. "description": "部门名称(包含祖部门)"
  204. },
  205. "orderNum": {
  206. "type": "integer",
  207. "format": "int32",
  208. "description": "显示顺序"
  209. },
  210. "leader": {
  211. "type": "string",
  212. "description": "负责人"
  213. },
  214. "phone": {
  215. "type": "string",
  216. "description": "联系电话",
  217. "maxLength": 11,
  218. "minLength": 0
  219. },
  220. "email": {
  221. "type": "string",
  222. "format": "email",
  223. "description": "邮箱",
  224. "maxLength": 50,
  225. "minLength": 0
  226. },
  227. "status": {
  228. "type": "string",
  229. "description": "状态标志(详见字典:系统开关)",
  230. "minLength": 1,
  231. "pattern": "^[01]$"
  232. },
  233. "delFlag": {
  234. "type": "string",
  235. "description": "删除标志(详见字典:删除标志)"
  236. },
  237. "createIdBy": {
  238. "type": "integer",
  239. "format": "int64",
  240. "description": "创建者ID"
  241. },
  242. "createBy": {
  243. "type": "string",
  244. "description": "创建者"
  245. },
  246. "createTime": {
  247. "type": "string",
  248. "format": "date-time",
  249. "description": "创建时间"
  250. },
  251. "updateIdBy": {
  252. "type": "integer",
  253. "format": "int64",
  254. "description": "更新者ID"
  255. },
  256. "updateBy": {
  257. "type": "string",
  258. "description": "更新者"
  259. },
  260. "updateTime": {
  261. "type": "string",
  262. "format": "date-time",
  263. "description": "更新时间"
  264. },
  265. "remark": {
  266. "type": "string",
  267. "description": "备注"
  268. },
  269. "parentName": {
  270. "type": "string",
  271. "description": "父部门名称"
  272. },
  273. "children": {
  274. "type": "array",
  275. "description": "子部门",
  276. "items": {
  277. "$ref": "#/components/schemas/DeptInfo"
  278. }
  279. }
  280. },
  281. "required": ["deptName", "orderNum", "parentId", "status"]
  282. },
  283. "SysRole": {
  284. "type": "object",
  285. "description": "角色对象",
  286. "properties": {
  287. "createIdBy": {
  288. "type": "integer",
  289. "format": "int64"
  290. },
  291. "createBy": {
  292. "type": "string"
  293. },
  294. "createTime": {
  295. "type": "string",
  296. "format": "date-time"
  297. },
  298. "updateIdBy": {
  299. "type": "integer",
  300. "format": "int64"
  301. },
  302. "updateBy": {
  303. "type": "string"
  304. },
  305. "updateTime": {
  306. "type": "string",
  307. "format": "date-time"
  308. },
  309. "remark": {
  310. "type": "string"
  311. },
  312. "params": {
  313. "type": "object",
  314. "additionalProperties": {}
  315. },
  316. "roleId": {
  317. "type": "integer",
  318. "format": "int64",
  319. "description": "角色ID"
  320. },
  321. "roleName": {
  322. "type": "string",
  323. "description": "角色名称",
  324. "maxLength": 30,
  325. "minLength": 0
  326. },
  327. "roleKey": {
  328. "type": "string",
  329. "description": "角色权限",
  330. "maxLength": 100,
  331. "minLength": 0
  332. },
  333. "roleSort": {
  334. "type": "integer",
  335. "format": "int32",
  336. "description": "角色排序"
  337. },
  338. "dataScope": {
  339. "type": "string",
  340. "description": "数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限;5:仅本人数据权限)"
  341. },
  342. "menuCheckStrictly": {
  343. "type": "boolean",
  344. "description": "菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示)"
  345. },
  346. "deptCheckStrictly": {
  347. "type": "boolean",
  348. "description": "部门树选择项是否关联显示(0:父子不互相关联显示 1:父子互相关联显示 )"
  349. },
  350. "status": {
  351. "type": "string",
  352. "description": "角色状态(0正常 1停用)"
  353. },
  354. "delFlag": {
  355. "type": "string",
  356. "description": "删除标志(0代表存在 2代表删除)"
  357. },
  358. "flag": {
  359. "type": "boolean",
  360. "description": "用户是否存在此角色标识 默认不存在"
  361. },
  362. "menuIds": {
  363. "type": "array",
  364. "description": "菜单组",
  365. "items": {
  366. "type": "integer",
  367. "format": "int64"
  368. }
  369. },
  370. "deptIds": {
  371. "type": "array",
  372. "description": "部门组(数据权限)",
  373. "items": {
  374. "type": "integer",
  375. "format": "int64"
  376. }
  377. },
  378. "permissions": {
  379. "type": "array",
  380. "description": "角色菜单权限",
  381. "items": {
  382. "type": "string"
  383. },
  384. "uniqueItems": true
  385. }
  386. },
  387. "required": ["roleName"]
  388. },
  389. "AjaxResult": {
  390. "type": "object",
  391. "description": "接口返回对象",
  392. "properties": {
  393. "code": {
  394. "type": "integer",
  395. "format": "int32",
  396. "description": "状态码"
  397. },
  398. "msg": {
  399. "type": "string",
  400. "description": "提示语"
  401. },
  402. "data": {
  403. "description": "数据对象"
  404. }
  405. }
  406. }
  407. }
  408. }
  409. }