docs.go 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068
  1. // GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
  2. // This file was generated by swaggo/swag
  3. package docs
  4. import (
  5. "bytes"
  6. "encoding/json"
  7. "strings"
  8. "github.com/alecthomas/template"
  9. "github.com/swaggo/swag"
  10. )
  11. var doc = `{
  12. "schemes": {{ marshal .Schemes }},
  13. "swagger": "2.0",
  14. "info": {
  15. "description": "{{.Description}}",
  16. "title": "{{.Title}}",
  17. "contact": {},
  18. "version": "{{.Version}}"
  19. },
  20. "host": "{{.Host}}",
  21. "basePath": "{{.BasePath}}",
  22. "paths": {
  23. "/base/getContentList": {
  24. "get": {
  25. "consumes": [
  26. "application/json"
  27. ],
  28. "produces": [
  29. "application/json"
  30. ],
  31. "tags": [
  32. "Base"
  33. ],
  34. "summary": "获取类容列表",
  35. "parameters": [
  36. {
  37. "type": "integer",
  38. "description": "页码",
  39. "name": "page",
  40. "in": "query"
  41. },
  42. {
  43. "type": "integer",
  44. "description": "每页大小",
  45. "name": "pageSize",
  46. "in": "query"
  47. },
  48. {
  49. "type": "string",
  50. "description": "类型(norm 评测标准 banner 轮播 bulletin 公告)",
  51. "name": "type",
  52. "in": "query"
  53. }
  54. ],
  55. "responses": {
  56. "200": {
  57. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  58. "schema": {
  59. "type": "string"
  60. }
  61. }
  62. }
  63. }
  64. },
  65. "/base/loginwx": {
  66. "post": {
  67. "produces": [
  68. "application/json"
  69. ],
  70. "tags": [
  71. "Base"
  72. ],
  73. "summary": "用户登录",
  74. "parameters": [
  75. {
  76. "description": "code",
  77. "name": "data",
  78. "in": "body",
  79. "required": true,
  80. "schema": {
  81. "$ref": "#/definitions/request.LoginWx"
  82. }
  83. }
  84. ],
  85. "responses": {
  86. "200": {
  87. "description": "{\"success\":true,\"data\":{},\"msg\":\"登陆成功\"}",
  88. "schema": {
  89. "type": "string"
  90. }
  91. }
  92. }
  93. }
  94. },
  95. "/base/register": {
  96. "post": {
  97. "produces": [
  98. "application/json"
  99. ],
  100. "tags": [
  101. "Base"
  102. ],
  103. "summary": "用户申请登陆",
  104. "parameters": [
  105. {
  106. "description": "用户名, 昵称,手机号,openid ",
  107. "name": "data",
  108. "in": "body",
  109. "required": true,
  110. "schema": {
  111. "$ref": "#/definitions/request.Register"
  112. }
  113. }
  114. ],
  115. "responses": {
  116. "200": {
  117. "description": "{\"success\":true,\"data\":{},\"msg\":\"登陆成功\"}",
  118. "schema": {
  119. "type": "string"
  120. }
  121. }
  122. }
  123. }
  124. },
  125. "/place/createPlace": {
  126. "post": {
  127. "security": [
  128. {
  129. "ApiKeyAuth": []
  130. }
  131. ],
  132. "produces": [
  133. "application/json"
  134. ],
  135. "tags": [
  136. "Place"
  137. ],
  138. "summary": "站点添加",
  139. "parameters": [
  140. {
  141. "description": "站点名称, 站点定位,站点类型,站点区域 ",
  142. "name": "data",
  143. "in": "body",
  144. "required": true,
  145. "schema": {
  146. "$ref": "#/definitions/request.Place"
  147. }
  148. }
  149. ],
  150. "responses": {
  151. "200": {
  152. "description": "{\"success\":true,\"data\":{},\"msg\":\"创建成功\"}",
  153. "schema": {
  154. "type": "string"
  155. }
  156. }
  157. }
  158. }
  159. },
  160. "/sysDictionary/findSysDictionary": {
  161. "get": {
  162. "security": [
  163. {
  164. "ApiKeyAuth": []
  165. }
  166. ],
  167. "consumes": [
  168. "application/json"
  169. ],
  170. "produces": [
  171. "application/json"
  172. ],
  173. "tags": [
  174. "Dict"
  175. ],
  176. "summary": "获取字典",
  177. "parameters": [
  178. {
  179. "type": "string",
  180. "description": "字典类型(部门列表 department 站点类型 site_type 问题列表 site_1 1为站点类型的值)",
  181. "name": "type",
  182. "in": "query"
  183. },
  184. ],
  185. "responses": {
  186. "200": {
  187. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  188. "schema": {
  189. "type": "string"
  190. }
  191. }
  192. }
  193. }
  194. },
  195. "/sysDictionary/findSysDictionaryName": {
  196. "get": {
  197. "security": [
  198. {
  199. "ApiKeyAuth": []
  200. }
  201. ],
  202. "consumes": [
  203. "application/json"
  204. ],
  205. "produces": [
  206. "application/json"
  207. ],
  208. "tags": [
  209. "Dict"
  210. ],
  211. "summary": "获取字典",
  212. "parameters": [
  213. {
  214. "type": "string",
  215. "description": "字典名称(城市类型)",
  216. "name": "name",
  217. "in": "query"
  218. },
  219. ],
  220. "responses": {
  221. "200": {
  222. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  223. "schema": {
  224. "type": "string"
  225. }
  226. }
  227. }
  228. }
  229. },
  230. "/place/deletePlace": {
  231. "delete": {
  232. "security": [
  233. {
  234. "ApiKeyAuth": []
  235. }
  236. ],
  237. "consumes": [
  238. "application/json"
  239. ],
  240. "produces": [
  241. "application/json"
  242. ],
  243. "tags": [
  244. "Place"
  245. ],
  246. "summary": "根据id删除站点",
  247. "parameters": [
  248. {
  249. "description": "根据id删除站点",
  250. "name": "data",
  251. "in": "body",
  252. "required": true,
  253. "schema": {
  254. "$ref": "#/definitions/request.findByID"
  255. }
  256. }
  257. ],
  258. "responses": {
  259. "200": {
  260. "description": "{\"success\":true,\"data\":{},\"msg\":\"删除成功\"}",
  261. "schema": {
  262. "type": "string"
  263. }
  264. }
  265. }
  266. }
  267. },
  268. "/place/findPlace": {
  269. "get": {
  270. "security": [
  271. {
  272. "ApiKeyAuth": []
  273. }
  274. ],
  275. "consumes": [
  276. "application/json"
  277. ],
  278. "produces": [
  279. "application/json"
  280. ],
  281. "tags": [
  282. "Place"
  283. ],
  284. "summary": "用id查询站点详情",
  285. "parameters": [
  286. {
  287. "type": "integer",
  288. "description": "id",
  289. "name": "ID",
  290. "in": "query"
  291. }
  292. ],
  293. "responses": {
  294. "200": {
  295. "description": "{\"success\":true,\"data\":{},\"msg\":\"查询成功\"}",
  296. "schema": {
  297. "type": "string"
  298. }
  299. }
  300. }
  301. }
  302. },
  303. "/place/updatePlace": {
  304. "put": {
  305. "security": [
  306. {
  307. "ApiKeyAuth": []
  308. }
  309. ],
  310. "consumes": [
  311. "application/json"
  312. ],
  313. "produces": [
  314. "application/json"
  315. ],
  316. "tags": [
  317. "Place"
  318. ],
  319. "summary": "更新站点信息",
  320. "parameters": [
  321. {
  322. "description": "更新站点信息",
  323. "name": "data",
  324. "in": "body",
  325. "required": true,
  326. "schema": {
  327. "$ref": "#/definitions/request.PlaceUpdate"
  328. }
  329. }
  330. ],
  331. "responses": {
  332. "200": {
  333. "description": "{\"success\":true,\"data\":{},\"msg\":\"更新成功\"}",
  334. "schema": {
  335. "type": "string"
  336. }
  337. }
  338. }
  339. }
  340. },
  341. "/place/getPlaceList": {
  342. "get": {
  343. "security": [
  344. {
  345. "ApiKeyAuth": []
  346. }
  347. ],
  348. "consumes": [
  349. "application/json"
  350. ],
  351. "produces": [
  352. "application/json"
  353. ],
  354. "tags": [
  355. "Place"
  356. ],
  357. "summary": "获取站点列表",
  358. "parameters": [
  359. {
  360. "type": "integer",
  361. "description": "页码",
  362. "name": "page",
  363. "in": "query"
  364. },
  365. {
  366. "type": "integer",
  367. "description": "每页大小",
  368. "name": "pageSize",
  369. "in": "query"
  370. },
  371. {
  372. "type": "string",
  373. "description": "城市名称模糊查询",
  374. "name": "name",
  375. "in": "query"
  376. }
  377. ],
  378. "responses": {
  379. "200": {
  380. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  381. "schema": {
  382. "type": "string"
  383. }
  384. }
  385. }
  386. }
  387. },
  388. "/problemInfo/updateProblemInfo": {
  389. "put": {
  390. "security": [
  391. {
  392. "ApiKeyAuth": []
  393. }
  394. ],
  395. "consumes": [
  396. "application/json"
  397. ],
  398. "produces": [
  399. "application/json"
  400. ],
  401. "tags": [
  402. "ProblemInfo"
  403. ],
  404. "summary": "处理问题",
  405. "parameters": [
  406. {
  407. "description": "处理问题",
  408. "name": "data",
  409. "in": "body",
  410. "required": true,
  411. "schema": {
  412. "$ref": "#/definitions/request.ProblemInfoC"
  413. }
  414. }
  415. ],
  416. "responses": {
  417. "200": {
  418. "description": "{\"success\":true,\"data\":{},\"msg\":\"更新成功\"}",
  419. "schema": {
  420. "type": "string"
  421. }
  422. }
  423. }
  424. }
  425. },
  426. "/problemInfo/createProblemInfo": {
  427. "post": {
  428. "security": [
  429. {
  430. "ApiKeyAuth": []
  431. }
  432. ],
  433. "produces": [
  434. "application/json"
  435. ],
  436. "tags": [
  437. "ProblemInfo"
  438. ],
  439. "summary": "发布问题",
  440. "parameters": [
  441. {
  442. "description": "发布问题",
  443. "name": "data",
  444. "in": "body",
  445. "required": true,
  446. "schema": {
  447. "$ref": "#/definitions/request.ProblemInfo"
  448. }
  449. }
  450. ],
  451. "responses": {
  452. "200": {
  453. "description": "{\"success\":true,\"data\":{},\"msg\":\"发布问题成功\"}",
  454. "schema": {
  455. "type": "string"
  456. }
  457. }
  458. }
  459. }
  460. },
  461. "/problemInfo/findProblemInfo": {
  462. "get": {
  463. "consumes": [
  464. "application/json"
  465. ],
  466. "produces": [
  467. "application/json"
  468. ],
  469. "tags": [
  470. "ProblemInfo"
  471. ],
  472. "summary": "用id查询问题详情",
  473. "parameters": [
  474. {
  475. "type": "integer",
  476. "description": "id",
  477. "name": "ID",
  478. "in": "query"
  479. }
  480. ],
  481. "responses": {
  482. "200": {
  483. "description": "{\"success\":true,\"data\":{},\"msg\":\"查询成功\"}",
  484. "schema": {
  485. "type": "string"
  486. }
  487. }
  488. }
  489. }
  490. },
  491. "/problemInfo/getProblemInfoList": {
  492. "get": {
  493. "security": [
  494. {
  495. "ApiKeyAuth": []
  496. }
  497. ],
  498. "consumes": [
  499. "application/json"
  500. ],
  501. "produces": [
  502. "application/json"
  503. ],
  504. "tags": [
  505. "ProblemInfo"
  506. ],
  507. "summary": "获取问题列表",
  508. "parameters": [
  509. {
  510. "type": "integer",
  511. "description": "页码",
  512. "name": "page",
  513. "in": "query"
  514. },
  515. {
  516. "type": "integer",
  517. "description": "每页大小",
  518. "name": "pageSize",
  519. "in": "query"
  520. },
  521. {
  522. "type": "string",
  523. "description": "状态(Untreated 未处理 Processed 已处理)",
  524. "name": "status",
  525. "in": "query"
  526. },
  527. {
  528. "type": "integer",
  529. "description": "发布人",
  530. "name": "oper",
  531. "in": "query"
  532. },
  533. {
  534. "type": "string",
  535. "description": "站点类型",
  536. "name": "siteType",
  537. "in": "query"
  538. }
  539. ],
  540. "responses": {
  541. "200": {
  542. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  543. "schema": {
  544. "type": "string"
  545. }
  546. }
  547. }
  548. }
  549. },
  550. "/content/createContent": {
  551. "post": {
  552. "security": [
  553. {
  554. "ApiKeyAuth": []
  555. }
  556. ],
  557. "produces": [
  558. "application/json"
  559. ],
  560. "tags": [
  561. "Content"
  562. ],
  563. "summary": "发布内容",
  564. "parameters": [
  565. {
  566. "description": "发布内容",
  567. "name": "data",
  568. "in": "body",
  569. "required": true,
  570. "schema": {
  571. "$ref": "#/definitions/request.Content"
  572. }
  573. }
  574. ],
  575. "responses": {
  576. "200": {
  577. "description": "{\"success\":true,\"data\":{},\"msg\":\"发布问题成功\"}",
  578. "schema": {
  579. "type": "string"
  580. }
  581. }
  582. }
  583. }
  584. },
  585. "/content/findContent": {
  586. "get": {
  587. "security": [
  588. {
  589. "ApiKeyAuth": []
  590. }
  591. ],
  592. "consumes": [
  593. "application/json"
  594. ],
  595. "produces": [
  596. "application/json"
  597. ],
  598. "tags": [
  599. "Content"
  600. ],
  601. "summary": "获取内容详情",
  602. "parameters": [
  603. {
  604. "type": "integer",
  605. "description": "id",
  606. "name": "ID",
  607. "in": "query"
  608. }
  609. ],
  610. "responses": {
  611. "200": {
  612. "description": "{\"success\":true,\"data\":{},\"msg\":\"查询成功\"}",
  613. "schema": {
  614. "type": "string"
  615. }
  616. }
  617. }
  618. }
  619. },
  620. "/content/getContentList": {
  621. "get": {
  622. "security": [
  623. {
  624. "ApiKeyAuth": []
  625. }
  626. ],
  627. "consumes": [
  628. "application/json"
  629. ],
  630. "produces": [
  631. "application/json"
  632. ],
  633. "tags": [
  634. "Content"
  635. ],
  636. "summary": "获取类容列表",
  637. "parameters": [
  638. {
  639. "type": "integer",
  640. "description": "页码",
  641. "name": "page",
  642. "in": "query"
  643. },
  644. {
  645. "type": "integer",
  646. "description": "每页大小",
  647. "name": "pageSize",
  648. "in": "query"
  649. },
  650. {
  651. "type": "string",
  652. "description": "类型(norm 评测标准 banner 轮播 bulletin 公告)",
  653. "name": "type",
  654. "in": "query"
  655. }
  656. ],
  657. "responses": {
  658. "200": {
  659. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  660. "schema": {
  661. "type": "string"
  662. }
  663. }
  664. }
  665. }
  666. },
  667. "/fileUploadAndDownload/upload": {
  668. "post": {
  669. "security": [
  670. {
  671. "ApiKeyAuth": []
  672. }
  673. ],
  674. "consumes": [
  675. "multipart/form-data"
  676. ],
  677. "produces": [
  678. "application/json"
  679. ],
  680. "tags": [
  681. "ExaFileUploadAndDownload"
  682. ],
  683. "summary": "上传文件示例",
  684. "parameters": [
  685. {
  686. "type": "file",
  687. "description": "上传文件示例",
  688. "name": "file",
  689. "in": "formData",
  690. "required": true
  691. }
  692. ],
  693. "responses": {
  694. "200": {
  695. "description": "{\"success\":true,\"data\":{},\"msg\":\"上传成功\"}",
  696. "schema": {
  697. "type": "string"
  698. }
  699. }
  700. }
  701. }
  702. },
  703. "/user/getUserInfo": {
  704. "get": {
  705. "security": [
  706. {
  707. "ApiKeyAuth": []
  708. }
  709. ],
  710. "consumes": [
  711. "application/json"
  712. ],
  713. "produces": [
  714. "application/json"
  715. ],
  716. "tags": [
  717. "SysUser"
  718. ],
  719. "summary": "获取用户信息",
  720. "responses": {
  721. "200": {
  722. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  723. "schema": {
  724. "type": "string"
  725. }
  726. }
  727. }
  728. }
  729. },
  730. "/user/setUserName": {
  731. "put": {
  732. "security": [
  733. {
  734. "ApiKeyAuth": []
  735. }
  736. ],
  737. "consumes": [
  738. "application/json"
  739. ],
  740. "produces": [
  741. "application/json"
  742. ],
  743. "tags": [
  744. "SysUser"
  745. ],
  746. "summary": "设置用户信息",
  747. "parameters": [
  748. {
  749. "description": "只用提交 ID, userName 就可以",
  750. "name": "data",
  751. "in": "body",
  752. "required": true,
  753. "schema": {
  754. "$ref": "#/definitions/system.SysUser"
  755. }
  756. }
  757. ],
  758. "responses": {
  759. "200": {
  760. "description": "{\"success\":true,\"data\":{},\"msg\":\"设置成功\"}",
  761. "schema": {
  762. "type": "string"
  763. }
  764. }
  765. }
  766. }
  767. }
  768. },
  769. "definitions": {
  770. "request.findByID": {
  771. "type": "object",
  772. "properties": {
  773. "id": {
  774. "type": "integer"
  775. }
  776. }
  777. },
  778. "request.LoginWx": {
  779. "type": "object",
  780. "properties": {
  781. "code": {
  782. "description": "登陆微信响应code",
  783. "type": "string"
  784. }
  785. }
  786. },
  787. "request.Place": {
  788. "type": "object",
  789. "properties": {
  790. "name": {
  791. "description": "站点名称",
  792. "type": "string"
  793. },
  794. "position": {
  795. "description": "站点定位",
  796. "type": "string"
  797. },
  798. "type": {
  799. "description": "站点类型",
  800. "type": "string"
  801. },
  802. "region": {
  803. "description": "站点区域",
  804. "type": "string"
  805. }
  806. }
  807. },
  808. "request.PlaceUpdate": {
  809. "type": "object",
  810. "properties": {
  811. "id": {
  812. "description": "主键ID",
  813. "type": "integer"
  814. },
  815. "name": {
  816. "description": "站点名称",
  817. "type": "string"
  818. },
  819. "position": {
  820. "description": "站点定位",
  821. "type": "string"
  822. },
  823. "type": {
  824. "description": "站点类型",
  825. "type": "string"
  826. },
  827. "region": {
  828. "description": "站点区域",
  829. "type": "string"
  830. }
  831. }
  832. },
  833. "request.ProblemInfo": {
  834. "type": "object",
  835. "properties": {
  836. "imgs": {
  837. "description": "问题图片(多图用|分割)",
  838. "type": "string"
  839. },
  840. "remark": {
  841. "description": "问题备注",
  842. "type": "string"
  843. },
  844. "video": {
  845. "description": "问题视频",
  846. "type": "string"
  847. },
  848. "siteId": {
  849. "description": "站点id",
  850. "type": "string"
  851. },
  852. "matter": {
  853. "description": "问题ids(用|分割)",
  854. "type": "string"
  855. },
  856. "department": {
  857. "description": "责任部门",
  858. "type": "string"
  859. }
  860. }
  861. },
  862. "request.ProblemInfoC": {
  863. "type": "object",
  864. "properties": {
  865. "ID": {
  866. "description": "问题ID",
  867. "type": "string"
  868. },
  869. "handler": {
  870. "description": "当前登陆人ID",
  871. "type": "string"
  872. },
  873. "status": {
  874. "description": "处理状态改为(Processed)",
  875. "type": "string"
  876. },
  877. "handText": {
  878. "description": "处理内容",
  879. "type": "string"
  880. },
  881. "handImgs": {
  882. "description": "处理图片(多图用|隔开)",
  883. "type": "string"
  884. },
  885. "imgs": {
  886. "description": "问题图片(多图用|分割)",
  887. "type": "string"
  888. },
  889. "video": {
  890. "description": "问题视频",
  891. "type": "string"
  892. },
  893. "siteId": {
  894. "description": "站点id",
  895. "type": "string"
  896. },
  897. "matter": {
  898. "description": "问题ids(用|分割)",
  899. "type": "string"
  900. },
  901. "department": {
  902. "description": "责任部门",
  903. "type": "string"
  904. }
  905. }
  906. },
  907. "request.Content": {
  908. "type": "object",
  909. "properties": {
  910. "oper": {
  911. "description": "发布人",
  912. "type": "string"
  913. },
  914. "title": {
  915. "description": "标题",
  916. "type": "string"
  917. },
  918. "subtitle": {
  919. "description": "副标题(仅公告可用)",
  920. "type": "string"
  921. },
  922. "text": {
  923. "description": "内容",
  924. "type": "string"
  925. },
  926. "imgs": {
  927. "description": "图片(多图用|分割)",
  928. "type": "string"
  929. },
  930. "type": {
  931. "description": "类型(bulletin 公告|norm 评测标准|banner 首页轮播)",
  932. "type": "string"
  933. }
  934. }
  935. },
  936. "request.Register": {
  937. "type": "object",
  938. "properties": {
  939. "nickName": {
  940. "description": "微信昵称",
  941. "type": "string"
  942. },
  943. "openId": {
  944. "description": "openId",
  945. "type": "string"
  946. },
  947. "headerImg": {
  948. "description": "微信头像",
  949. "type": "string"
  950. },
  951. "username": {
  952. "description": "手机号",
  953. "type": "string"
  954. }
  955. }
  956. },
  957. "system.SysUser": {
  958. "type": "object",
  959. "properties": {
  960. "activeColor": {
  961. "description": "活跃颜色",
  962. "type": "string"
  963. },
  964. "authorityId": {
  965. "description": "用户角色ID",
  966. "type": "string"
  967. },
  968. "baseColor": {
  969. "description": "基础颜色",
  970. "type": "string"
  971. },
  972. "createdAt": {
  973. "description": "创建时间",
  974. "type": "string"
  975. },
  976. "headerImg": {
  977. "description": "用户头像",
  978. "type": "string"
  979. },
  980. "ID": {
  981. "description": "主键ID",
  982. "type": "integer"
  983. },
  984. "nickName": {
  985. "description": "用户昵称",
  986. "type": "string"
  987. },
  988. "sideMode": {
  989. "description": "用户侧边主题",
  990. "type": "string"
  991. },
  992. "updatedAt": {
  993. "description": "更新时间",
  994. "type": "string"
  995. },
  996. "userName": {
  997. "description": "用户名",
  998. "type": "string"
  999. },
  1000. "uuid": {
  1001. "description": "用户UUID",
  1002. "type": "string"
  1003. }
  1004. }
  1005. },
  1006. },
  1007. "securityDefinitions": {
  1008. "ApiKeyAuth": {
  1009. "type": "apiKey",
  1010. "name": "x-token",
  1011. "in": "header"
  1012. }
  1013. }
  1014. }`
  1015. type swaggerInfo struct {
  1016. Version string
  1017. Host string
  1018. BasePath string
  1019. Schemes []string
  1020. Title string
  1021. Description string
  1022. }
  1023. // SwaggerInfo holds exported Swagger Info so clients can modify it
  1024. var SwaggerInfo = swaggerInfo{
  1025. Version: "0.0.1.txt",
  1026. Host: "",
  1027. BasePath: "/api/",
  1028. Schemes: []string{},
  1029. Title: "Swagger Example API",
  1030. Description: "请求响应code 成功是0 未注册1 审核中2 错误是7",
  1031. }
  1032. type s struct{}
  1033. func (s *s) ReadDoc() string {
  1034. sInfo := SwaggerInfo
  1035. sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
  1036. t, err := template.New("swagger_info").Funcs(template.FuncMap{
  1037. "marshal": func(v interface{}) string {
  1038. a, _ := json.Marshal(v)
  1039. return string(a)
  1040. },
  1041. }).Parse(doc)
  1042. if err != nil {
  1043. return doc
  1044. }
  1045. var tpl bytes.Buffer
  1046. if err := t.Execute(&tpl, sInfo); err != nil {
  1047. return doc
  1048. }
  1049. return tpl.String()
  1050. }
  1051. func init() {
  1052. swag.Register(swag.Name, &s{})
  1053. }