docs.go 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941
  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. "/place/deletePlace": {
  196. "delete": {
  197. "security": [
  198. {
  199. "ApiKeyAuth": []
  200. }
  201. ],
  202. "consumes": [
  203. "application/json"
  204. ],
  205. "produces": [
  206. "application/json"
  207. ],
  208. "tags": [
  209. "Place"
  210. ],
  211. "summary": "根据id删除站点",
  212. "parameters": [
  213. {
  214. "description": "根据id删除站点",
  215. "name": "data",
  216. "in": "body",
  217. "required": true,
  218. "schema": {
  219. "$ref": "#/definitions/request.findByID"
  220. }
  221. }
  222. ],
  223. "responses": {
  224. "200": {
  225. "description": "{\"success\":true,\"data\":{},\"msg\":\"删除成功\"}",
  226. "schema": {
  227. "type": "string"
  228. }
  229. }
  230. }
  231. }
  232. },
  233. "/place/findPlace": {
  234. "get": {
  235. "security": [
  236. {
  237. "ApiKeyAuth": []
  238. }
  239. ],
  240. "consumes": [
  241. "application/json"
  242. ],
  243. "produces": [
  244. "application/json"
  245. ],
  246. "tags": [
  247. "Place"
  248. ],
  249. "summary": "用id查询站点详情",
  250. "parameters": [
  251. {
  252. "type": "integer",
  253. "description": "id",
  254. "name": "ID",
  255. "in": "query"
  256. }
  257. ],
  258. "responses": {
  259. "200": {
  260. "description": "{\"success\":true,\"data\":{},\"msg\":\"查询成功\"}",
  261. "schema": {
  262. "type": "string"
  263. }
  264. }
  265. }
  266. }
  267. },
  268. "/place/updatePlace": {
  269. "put": {
  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": "更新站点信息",
  285. "parameters": [
  286. {
  287. "description": "更新站点信息",
  288. "name": "data",
  289. "in": "body",
  290. "required": true,
  291. "schema": {
  292. "$ref": "#/definitions/request.PlaceUpdate"
  293. }
  294. }
  295. ],
  296. "responses": {
  297. "200": {
  298. "description": "{\"success\":true,\"data\":{},\"msg\":\"更新成功\"}",
  299. "schema": {
  300. "type": "string"
  301. }
  302. }
  303. }
  304. }
  305. },
  306. "/place/getPlaceList": {
  307. "get": {
  308. "security": [
  309. {
  310. "ApiKeyAuth": []
  311. }
  312. ],
  313. "consumes": [
  314. "application/json"
  315. ],
  316. "produces": [
  317. "application/json"
  318. ],
  319. "tags": [
  320. "Place"
  321. ],
  322. "summary": "获取站点列表",
  323. "parameters": [
  324. {
  325. "type": "integer",
  326. "description": "页码",
  327. "name": "page",
  328. "in": "query"
  329. },
  330. {
  331. "type": "integer",
  332. "description": "每页大小",
  333. "name": "pageSize",
  334. "in": "query"
  335. }
  336. ],
  337. "responses": {
  338. "200": {
  339. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  340. "schema": {
  341. "type": "string"
  342. }
  343. }
  344. }
  345. }
  346. },
  347. "/problemInfo/updateProblemInfo": {
  348. "put": {
  349. "security": [
  350. {
  351. "ApiKeyAuth": []
  352. }
  353. ],
  354. "consumes": [
  355. "application/json"
  356. ],
  357. "produces": [
  358. "application/json"
  359. ],
  360. "tags": [
  361. "ProblemInfo"
  362. ],
  363. "summary": "处理问题",
  364. "parameters": [
  365. {
  366. "description": "处理问题",
  367. "name": "data",
  368. "in": "body",
  369. "required": true,
  370. "schema": {
  371. "$ref": "#/definitions/request.ProblemInfoC"
  372. }
  373. }
  374. ],
  375. "responses": {
  376. "200": {
  377. "description": "{\"success\":true,\"data\":{},\"msg\":\"更新成功\"}",
  378. "schema": {
  379. "type": "string"
  380. }
  381. }
  382. }
  383. }
  384. },
  385. "/problemInfo/createProblemInfo": {
  386. "post": {
  387. "security": [
  388. {
  389. "ApiKeyAuth": []
  390. }
  391. ],
  392. "produces": [
  393. "application/json"
  394. ],
  395. "tags": [
  396. "ProblemInfo"
  397. ],
  398. "summary": "发布问题",
  399. "parameters": [
  400. {
  401. "description": "发布问题",
  402. "name": "data",
  403. "in": "body",
  404. "required": true,
  405. "schema": {
  406. "$ref": "#/definitions/request.ProblemInfo"
  407. }
  408. }
  409. ],
  410. "responses": {
  411. "200": {
  412. "description": "{\"success\":true,\"data\":{},\"msg\":\"发布问题成功\"}",
  413. "schema": {
  414. "type": "string"
  415. }
  416. }
  417. }
  418. }
  419. },
  420. "/problemInfo/findProblemInfo": {
  421. "get": {
  422. "security": [
  423. {
  424. "ApiKeyAuth": []
  425. }
  426. ],
  427. "consumes": [
  428. "application/json"
  429. ],
  430. "produces": [
  431. "application/json"
  432. ],
  433. "tags": [
  434. "ProblemInfo"
  435. ],
  436. "summary": "用id查询问题详情",
  437. "parameters": [
  438. {
  439. "type": "integer",
  440. "description": "id",
  441. "name": "ID",
  442. "in": "query"
  443. }
  444. ],
  445. "responses": {
  446. "200": {
  447. "description": "{\"success\":true,\"data\":{},\"msg\":\"查询成功\"}",
  448. "schema": {
  449. "type": "string"
  450. }
  451. }
  452. }
  453. }
  454. },
  455. "/problemInfo/getProblemInfoList": {
  456. "get": {
  457. "security": [
  458. {
  459. "ApiKeyAuth": []
  460. }
  461. ],
  462. "consumes": [
  463. "application/json"
  464. ],
  465. "produces": [
  466. "application/json"
  467. ],
  468. "tags": [
  469. "ProblemInfo"
  470. ],
  471. "summary": "获取问题列表",
  472. "parameters": [
  473. {
  474. "type": "integer",
  475. "description": "页码",
  476. "name": "page",
  477. "in": "query"
  478. },
  479. {
  480. "type": "integer",
  481. "description": "每页大小",
  482. "name": "pageSize",
  483. "in": "query"
  484. },
  485. {
  486. "type": "string",
  487. "description": "状态(Untreated 未处理 Processed 已处理)",
  488. "name": "status",
  489. "in": "query"
  490. },
  491. {
  492. "type": "integer",
  493. "description": "发布人",
  494. "name": "oper",
  495. "in": "query"
  496. },
  497. {
  498. "type": "string",
  499. "description": "站点类型",
  500. "name": "siteType",
  501. "in": "query"
  502. }
  503. ],
  504. "responses": {
  505. "200": {
  506. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  507. "schema": {
  508. "type": "string"
  509. }
  510. }
  511. }
  512. }
  513. },
  514. "/content/createContent": {
  515. "post": {
  516. "security": [
  517. {
  518. "ApiKeyAuth": []
  519. }
  520. ],
  521. "produces": [
  522. "application/json"
  523. ],
  524. "tags": [
  525. "Content"
  526. ],
  527. "summary": "发布内容",
  528. "parameters": [
  529. {
  530. "description": "发布内容",
  531. "name": "data",
  532. "in": "body",
  533. "required": true,
  534. "schema": {
  535. "$ref": "#/definitions/request.Content"
  536. }
  537. }
  538. ],
  539. "responses": {
  540. "200": {
  541. "description": "{\"success\":true,\"data\":{},\"msg\":\"发布问题成功\"}",
  542. "schema": {
  543. "type": "string"
  544. }
  545. }
  546. }
  547. }
  548. },
  549. "/content/findContent": {
  550. "get": {
  551. "security": [
  552. {
  553. "ApiKeyAuth": []
  554. }
  555. ],
  556. "consumes": [
  557. "application/json"
  558. ],
  559. "produces": [
  560. "application/json"
  561. ],
  562. "tags": [
  563. "Content"
  564. ],
  565. "summary": "获取内容详情",
  566. "parameters": [
  567. {
  568. "type": "integer",
  569. "description": "id",
  570. "name": "ID",
  571. "in": "query"
  572. }
  573. ],
  574. "responses": {
  575. "200": {
  576. "description": "{\"success\":true,\"data\":{},\"msg\":\"查询成功\"}",
  577. "schema": {
  578. "type": "string"
  579. }
  580. }
  581. }
  582. }
  583. },
  584. "/content/getContentList": {
  585. "get": {
  586. "security": [
  587. {
  588. "ApiKeyAuth": []
  589. }
  590. ],
  591. "consumes": [
  592. "application/json"
  593. ],
  594. "produces": [
  595. "application/json"
  596. ],
  597. "tags": [
  598. "Content"
  599. ],
  600. "summary": "获取类容列表",
  601. "parameters": [
  602. {
  603. "type": "integer",
  604. "description": "页码",
  605. "name": "page",
  606. "in": "query"
  607. },
  608. {
  609. "type": "integer",
  610. "description": "每页大小",
  611. "name": "pageSize",
  612. "in": "query"
  613. },
  614. {
  615. "type": "string",
  616. "description": "类型(norm 评测标准 banner 轮播 bulletin 公告)",
  617. "name": "type",
  618. "in": "query"
  619. }
  620. ],
  621. "responses": {
  622. "200": {
  623. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  624. "schema": {
  625. "type": "string"
  626. }
  627. }
  628. }
  629. }
  630. },
  631. "/fileUploadAndDownload/upload": {
  632. "post": {
  633. "security": [
  634. {
  635. "ApiKeyAuth": []
  636. }
  637. ],
  638. "consumes": [
  639. "multipart/form-data"
  640. ],
  641. "produces": [
  642. "application/json"
  643. ],
  644. "tags": [
  645. "ExaFileUploadAndDownload"
  646. ],
  647. "summary": "上传文件示例",
  648. "parameters": [
  649. {
  650. "type": "file",
  651. "description": "上传文件示例",
  652. "name": "file",
  653. "in": "formData",
  654. "required": true
  655. }
  656. ],
  657. "responses": {
  658. "200": {
  659. "description": "{\"success\":true,\"data\":{},\"msg\":\"上传成功\"}",
  660. "schema": {
  661. "type": "string"
  662. }
  663. }
  664. }
  665. }
  666. },
  667. "/user/getUserInfo": {
  668. "get": {
  669. "security": [
  670. {
  671. "ApiKeyAuth": []
  672. }
  673. ],
  674. "consumes": [
  675. "application/json"
  676. ],
  677. "produces": [
  678. "application/json"
  679. ],
  680. "tags": [
  681. "SysUser"
  682. ],
  683. "summary": "获取用户信息",
  684. "responses": {
  685. "200": {
  686. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  687. "schema": {
  688. "type": "string"
  689. }
  690. }
  691. }
  692. }
  693. }
  694. },
  695. "definitions": {
  696. "request.findByID": {
  697. "type": "object",
  698. "properties": {
  699. "id": {
  700. "type": "integer"
  701. }
  702. }
  703. },
  704. "request.LoginWx": {
  705. "type": "object",
  706. "properties": {
  707. "code": {
  708. "description": "登陆微信响应code",
  709. "type": "string"
  710. }
  711. }
  712. },
  713. "request.Place": {
  714. "type": "object",
  715. "properties": {
  716. "name": {
  717. "description": "站点名称",
  718. "type": "string"
  719. },
  720. "position": {
  721. "description": "站点定位",
  722. "type": "string"
  723. },
  724. "type": {
  725. "description": "站点类型",
  726. "type": "string"
  727. },
  728. "region": {
  729. "description": "站点区域",
  730. "type": "string"
  731. }
  732. }
  733. },
  734. "request.PlaceUpdate": {
  735. "type": "object",
  736. "properties": {
  737. "id": {
  738. "description": "主键ID",
  739. "type": "integer"
  740. },
  741. "name": {
  742. "description": "站点名称",
  743. "type": "string"
  744. },
  745. "position": {
  746. "description": "站点定位",
  747. "type": "string"
  748. },
  749. "type": {
  750. "description": "站点类型",
  751. "type": "string"
  752. },
  753. "region": {
  754. "description": "站点区域",
  755. "type": "string"
  756. }
  757. }
  758. },
  759. "request.ProblemInfo": {
  760. "type": "object",
  761. "properties": {
  762. "imgs": {
  763. "description": "问题图片(多图用|分割)",
  764. "type": "string"
  765. },
  766. "video": {
  767. "description": "问题视频",
  768. "type": "string"
  769. },
  770. "siteId": {
  771. "description": "站点id",
  772. "type": "string"
  773. },
  774. "matter": {
  775. "description": "问题ids(用|分割)",
  776. "type": "string"
  777. },
  778. "department": {
  779. "description": "责任部门",
  780. "type": "string"
  781. }
  782. }
  783. },
  784. "request.ProblemInfoC": {
  785. "type": "object",
  786. "properties": {
  787. "ID": {
  788. "description": "问题ID",
  789. "type": "string"
  790. },
  791. "handler": {
  792. "description": "当前登陆人ID",
  793. "type": "string"
  794. },
  795. "status": {
  796. "description": "处理状态改为(Processed)",
  797. "type": "string"
  798. },
  799. "handText": {
  800. "description": "处理内容",
  801. "type": "string"
  802. },
  803. "handImgs": {
  804. "description": "处理图片(多图用|隔开)",
  805. "type": "string"
  806. },
  807. "imgs": {
  808. "description": "问题图片(多图用|分割)",
  809. "type": "string"
  810. },
  811. "video": {
  812. "description": "问题视频",
  813. "type": "string"
  814. },
  815. "siteId": {
  816. "description": "站点id",
  817. "type": "string"
  818. },
  819. "matter": {
  820. "description": "问题ids(用|分割)",
  821. "type": "string"
  822. },
  823. "department": {
  824. "description": "责任部门",
  825. "type": "string"
  826. }
  827. }
  828. },
  829. "request.Content": {
  830. "type": "object",
  831. "properties": {
  832. "oper": {
  833. "description": "发布人",
  834. "type": "string"
  835. },
  836. "title": {
  837. "description": "标题",
  838. "type": "string"
  839. },
  840. "subtitle": {
  841. "description": "副标题(仅公告可用)",
  842. "type": "string"
  843. },
  844. "text": {
  845. "description": "内容",
  846. "type": "string"
  847. },
  848. "imgs": {
  849. "description": "图片(多图用|分割)",
  850. "type": "string"
  851. },
  852. "type": {
  853. "description": "类型(bulletin 公告|norm 评测标准|banner 首页轮播)",
  854. "type": "string"
  855. }
  856. }
  857. },
  858. "request.Register": {
  859. "type": "object",
  860. "properties": {
  861. "nickName": {
  862. "description": "微信昵称",
  863. "type": "string"
  864. },
  865. "openId": {
  866. "description": "openId",
  867. "type": "string"
  868. },
  869. "headerImg": {
  870. "description": "微信头像",
  871. "type": "string"
  872. },
  873. "username": {
  874. "description": "手机号",
  875. "type": "string"
  876. }
  877. }
  878. }
  879. },
  880. "securityDefinitions": {
  881. "ApiKeyAuth": {
  882. "type": "apiKey",
  883. "name": "x-token",
  884. "in": "header"
  885. }
  886. }
  887. }`
  888. type swaggerInfo struct {
  889. Version string
  890. Host string
  891. BasePath string
  892. Schemes []string
  893. Title string
  894. Description string
  895. }
  896. // SwaggerInfo holds exported Swagger Info so clients can modify it
  897. var SwaggerInfo = swaggerInfo{
  898. Version: "0.0.1.txt",
  899. Host: "",
  900. BasePath: "/api/",
  901. Schemes: []string{},
  902. Title: "Swagger Example API",
  903. Description: "请求响应code 成功是0 未注册1 审核中2 错误是7",
  904. }
  905. type s struct{}
  906. func (s *s) ReadDoc() string {
  907. sInfo := SwaggerInfo
  908. sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
  909. t, err := template.New("swagger_info").Funcs(template.FuncMap{
  910. "marshal": func(v interface{}) string {
  911. a, _ := json.Marshal(v)
  912. return string(a)
  913. },
  914. }).Parse(doc)
  915. if err != nil {
  916. return doc
  917. }
  918. var tpl bytes.Buffer
  919. if err := t.Execute(&tpl, sInfo); err != nil {
  920. return doc
  921. }
  922. return tpl.String()
  923. }
  924. func init() {
  925. swag.Register(swag.Name, &s{})
  926. }