docs.go 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488
  1. // Code generated by swaggo/swag. DO NOT EDIT.
  2. package docs
  3. import "github.com/swaggo/swag"
  4. const docTemplate = `{
  5. "schemes": {{ marshal .Schemes }},
  6. "swagger": "2.0",
  7. "info": {
  8. "description": "{{escape .Description}}",
  9. "title": "{{.Title}}",
  10. "termsOfService": "http://swagger.io/terms/",
  11. "contact": {},
  12. "license": {
  13. "name": "Apache 2.0",
  14. "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
  15. },
  16. "version": "{{.Version}}"
  17. },
  18. "host": "{{.Host}}",
  19. "basePath": "{{.BasePath}}",
  20. "paths": {
  21. "/appraise/create": {
  22. "post": {
  23. "produces": [
  24. "application/json"
  25. ],
  26. "tags": [
  27. "评论模块"
  28. ],
  29. "summary": "创建评论",
  30. "parameters": [
  31. {
  32. "description": "评价信息",
  33. "name": "json",
  34. "in": "body",
  35. "required": true,
  36. "schema": {
  37. "$ref": "#/definitions/model.AppraiseJson"
  38. }
  39. }
  40. ],
  41. "responses": {
  42. "200": {
  43. "description": "OK",
  44. "schema": {
  45. "$ref": "#/definitions/response.Response"
  46. }
  47. }
  48. }
  49. }
  50. },
  51. "/appraise/delete/{id}": {
  52. "delete": {
  53. "produces": [
  54. "application/json"
  55. ],
  56. "tags": [
  57. "评论模块"
  58. ],
  59. "summary": "删除评论",
  60. "parameters": [
  61. {
  62. "type": "integer",
  63. "description": "评论id",
  64. "name": "id",
  65. "in": "path",
  66. "required": true
  67. }
  68. ],
  69. "responses": {
  70. "200": {
  71. "description": "OK",
  72. "schema": {
  73. "$ref": "#/definitions/response.Response"
  74. }
  75. }
  76. }
  77. }
  78. },
  79. "/appraise/revise": {
  80. "post": {
  81. "produces": [
  82. "application/json"
  83. ],
  84. "tags": [
  85. "评论模块"
  86. ],
  87. "summary": "修改评论",
  88. "parameters": [
  89. {
  90. "description": "评价信息",
  91. "name": "json",
  92. "in": "body",
  93. "required": true,
  94. "schema": {
  95. "$ref": "#/definitions/model.Appraise"
  96. }
  97. }
  98. ],
  99. "responses": {
  100. "200": {
  101. "description": "OK",
  102. "schema": {
  103. "$ref": "#/definitions/response.Response"
  104. }
  105. }
  106. }
  107. }
  108. },
  109. "/appraise/user": {
  110. "get": {
  111. "produces": [
  112. "application/json"
  113. ],
  114. "tags": [
  115. "评论模块"
  116. ],
  117. "summary": "获取用户评价",
  118. "parameters": [
  119. {
  120. "type": "integer",
  121. "description": "用户id",
  122. "name": "id",
  123. "in": "query",
  124. "required": true
  125. }
  126. ],
  127. "responses": {
  128. "200": {
  129. "description": "OK",
  130. "schema": {
  131. "$ref": "#/definitions/response.Response"
  132. }
  133. }
  134. }
  135. }
  136. },
  137. "/appraise/{page}/{pageSize}": {
  138. "get": {
  139. "produces": [
  140. "application/json"
  141. ],
  142. "tags": [
  143. "评论模块"
  144. ],
  145. "summary": "分页获取评论信息",
  146. "parameters": [
  147. {
  148. "type": "integer",
  149. "description": "页数",
  150. "name": "page",
  151. "in": "path",
  152. "required": true
  153. },
  154. {
  155. "type": "integer",
  156. "description": "一页的大小",
  157. "name": "pageSize",
  158. "in": "path",
  159. "required": true
  160. }
  161. ],
  162. "responses": {
  163. "200": {
  164. "description": "OK",
  165. "schema": {
  166. "$ref": "#/definitions/response.Response"
  167. }
  168. }
  169. }
  170. }
  171. },
  172. "/category": {
  173. "get": {
  174. "consumes": [
  175. "application/json"
  176. ],
  177. "produces": [
  178. "application/json"
  179. ],
  180. "tags": [
  181. "分类模块"
  182. ],
  183. "summary": "获取所有分类",
  184. "responses": {
  185. "200": {
  186. "description": "OK",
  187. "schema": {
  188. "$ref": "#/definitions/response.Response"
  189. }
  190. }
  191. }
  192. }
  193. },
  194. "/category/create": {
  195. "post": {
  196. "consumes": [
  197. "application/json"
  198. ],
  199. "produces": [
  200. "application/json"
  201. ],
  202. "tags": [
  203. "分类模块"
  204. ],
  205. "summary": "创建分类",
  206. "parameters": [
  207. {
  208. "description": "分类数据",
  209. "name": "json",
  210. "in": "body",
  211. "required": true,
  212. "schema": {
  213. "$ref": "#/definitions/model.CategoryJson"
  214. }
  215. }
  216. ],
  217. "responses": {
  218. "200": {
  219. "description": "OK",
  220. "schema": {
  221. "$ref": "#/definitions/response.Response"
  222. }
  223. }
  224. }
  225. }
  226. },
  227. "/category/delete/{id}": {
  228. "delete": {
  229. "produces": [
  230. "application/json"
  231. ],
  232. "tags": [
  233. "分类模块"
  234. ],
  235. "summary": "根据分类id删除某个分类",
  236. "parameters": [
  237. {
  238. "type": "integer",
  239. "description": "分类id",
  240. "name": "id",
  241. "in": "path",
  242. "required": true
  243. }
  244. ],
  245. "responses": {
  246. "200": {
  247. "description": "OK",
  248. "schema": {
  249. "$ref": "#/definitions/response.Response"
  250. }
  251. }
  252. }
  253. }
  254. },
  255. "/chat": {
  256. "get": {
  257. "tags": [
  258. "聊天模块"
  259. ],
  260. "summary": "与服务端进行websocket连接,请使用postman测试",
  261. "responses": {
  262. "200": {
  263. "description": "OK",
  264. "schema": {
  265. "$ref": "#/definitions/response.Response"
  266. }
  267. }
  268. }
  269. }
  270. },
  271. "/chat/from/{page}/{pageSize}": {
  272. "get": {
  273. "tags": [
  274. "聊天模块"
  275. ],
  276. "summary": "获取未过期且来源为特定用户的聊天记录",
  277. "parameters": [
  278. {
  279. "type": "integer",
  280. "description": "页数",
  281. "name": "page",
  282. "in": "path",
  283. "required": true
  284. },
  285. {
  286. "type": "integer",
  287. "description": "一页的大小",
  288. "name": "pageSize",
  289. "in": "path",
  290. "required": true
  291. },
  292. {
  293. "type": "string",
  294. "description": "用户id",
  295. "name": "uid",
  296. "in": "query",
  297. "required": true
  298. }
  299. ],
  300. "responses": {
  301. "200": {
  302. "description": "OK",
  303. "schema": {
  304. "$ref": "#/definitions/response.Response"
  305. }
  306. }
  307. }
  308. }
  309. },
  310. "/chat/to/{page}/{pageSize}": {
  311. "get": {
  312. "tags": [
  313. "聊天模块"
  314. ],
  315. "summary": "获取未过期且目标为特定用户的聊天记录",
  316. "parameters": [
  317. {
  318. "type": "integer",
  319. "description": "页数",
  320. "name": "page",
  321. "in": "path",
  322. "required": true
  323. },
  324. {
  325. "type": "integer",
  326. "description": "一页的大小",
  327. "name": "pageSize",
  328. "in": "path",
  329. "required": true
  330. },
  331. {
  332. "type": "string",
  333. "description": "用户id",
  334. "name": "uid",
  335. "in": "query",
  336. "required": true
  337. }
  338. ],
  339. "responses": {
  340. "200": {
  341. "description": "OK",
  342. "schema": {
  343. "$ref": "#/definitions/response.Response"
  344. }
  345. }
  346. }
  347. }
  348. },
  349. "/goods/category/{page}/{pageSize}": {
  350. "get": {
  351. "produces": [
  352. "application/json"
  353. ],
  354. "tags": [
  355. "商品模块"
  356. ],
  357. "summary": "按分类查找商品并分页显示",
  358. "parameters": [
  359. {
  360. "type": "integer",
  361. "description": "页数",
  362. "name": "page",
  363. "in": "path",
  364. "required": true
  365. },
  366. {
  367. "type": "integer",
  368. "description": "一页的大小",
  369. "name": "pageSize",
  370. "in": "path",
  371. "required": true
  372. },
  373. {
  374. "type": "integer",
  375. "description": "商品分类id",
  376. "name": "category",
  377. "in": "query",
  378. "required": true
  379. }
  380. ],
  381. "responses": {
  382. "200": {
  383. "description": "OK",
  384. "schema": {
  385. "$ref": "#/definitions/response.Response"
  386. }
  387. }
  388. }
  389. }
  390. },
  391. "/goods/create": {
  392. "post": {
  393. "consumes": [
  394. "application/json"
  395. ],
  396. "produces": [
  397. "application/json"
  398. ],
  399. "tags": [
  400. "商品模块"
  401. ],
  402. "summary": "创建商品",
  403. "parameters": [
  404. {
  405. "description": "商品信息",
  406. "name": "json",
  407. "in": "body",
  408. "required": true,
  409. "schema": {
  410. "$ref": "#/definitions/model.GoodsJson"
  411. }
  412. }
  413. ],
  414. "responses": {
  415. "200": {
  416. "description": "OK",
  417. "schema": {
  418. "$ref": "#/definitions/response.Response"
  419. }
  420. }
  421. }
  422. }
  423. },
  424. "/goods/delete/{id}": {
  425. "delete": {
  426. "produces": [
  427. "application/json"
  428. ],
  429. "tags": [
  430. "商品模块"
  431. ],
  432. "summary": "删除商品",
  433. "parameters": [
  434. {
  435. "type": "integer",
  436. "description": "商品id",
  437. "name": "id",
  438. "in": "path",
  439. "required": true
  440. }
  441. ],
  442. "responses": {
  443. "200": {
  444. "description": "OK",
  445. "schema": {
  446. "$ref": "#/definitions/response.Response"
  447. }
  448. }
  449. }
  450. }
  451. },
  452. "/goods/detail/{id}": {
  453. "get": {
  454. "produces": [
  455. "application/json"
  456. ],
  457. "tags": [
  458. "商品模块"
  459. ],
  460. "summary": "获取商品详细信息",
  461. "parameters": [
  462. {
  463. "type": "integer",
  464. "description": "商品id",
  465. "name": "id",
  466. "in": "path",
  467. "required": true
  468. },
  469. {
  470. "type": "integer",
  471. "description": "访问的用户id",
  472. "name": "uid",
  473. "in": "query",
  474. "required": true
  475. },
  476. {
  477. "type": "integer",
  478. "description": "访问时间的时间戳",
  479. "name": "date",
  480. "in": "query",
  481. "required": true
  482. }
  483. ],
  484. "responses": {
  485. "200": {
  486. "description": "OK",
  487. "schema": {
  488. "$ref": "#/definitions/response.Response"
  489. }
  490. }
  491. }
  492. }
  493. },
  494. "/goods/recommend": {
  495. "get": {
  496. "produces": [
  497. "application/json"
  498. ],
  499. "tags": [
  500. "商品模块"
  501. ],
  502. "summary": "分页获取推荐商品",
  503. "parameters": [
  504. {
  505. "type": "integer",
  506. "description": "用户id",
  507. "name": "id",
  508. "in": "query",
  509. "required": true
  510. },
  511. {
  512. "type": "integer",
  513. "description": "推荐的数目",
  514. "name": "size",
  515. "in": "query",
  516. "required": true
  517. }
  518. ],
  519. "responses": {
  520. "200": {
  521. "description": "OK",
  522. "schema": {
  523. "$ref": "#/definitions/response.Response"
  524. }
  525. }
  526. }
  527. }
  528. },
  529. "/goods/revise": {
  530. "post": {
  531. "produces": [
  532. "application/json"
  533. ],
  534. "tags": [
  535. "商品模块"
  536. ],
  537. "summary": "修改商品信息",
  538. "parameters": [
  539. {
  540. "description": "商品信息",
  541. "name": "json",
  542. "in": "body",
  543. "required": true,
  544. "schema": {
  545. "$ref": "#/definitions/model.Goods"
  546. }
  547. }
  548. ],
  549. "responses": {
  550. "200": {
  551. "description": "OK",
  552. "schema": {
  553. "$ref": "#/definitions/response.Response"
  554. }
  555. }
  556. }
  557. }
  558. },
  559. "/goods/search/{page}/{pageSize}": {
  560. "get": {
  561. "produces": [
  562. "application/json"
  563. ],
  564. "tags": [
  565. "商品模块"
  566. ],
  567. "summary": "搜索商品并分页显示",
  568. "parameters": [
  569. {
  570. "type": "integer",
  571. "description": "页数",
  572. "name": "page",
  573. "in": "path",
  574. "required": true
  575. },
  576. {
  577. "type": "integer",
  578. "description": "一页的大小",
  579. "name": "pageSize",
  580. "in": "path",
  581. "required": true
  582. },
  583. {
  584. "type": "string",
  585. "description": "搜素关键词",
  586. "name": "keyword",
  587. "in": "query",
  588. "required": true
  589. }
  590. ],
  591. "responses": {
  592. "200": {
  593. "description": "OK",
  594. "schema": {
  595. "$ref": "#/definitions/response.Response"
  596. }
  597. }
  598. }
  599. }
  600. },
  601. "/goods/user/{id}": {
  602. "get": {
  603. "produces": [
  604. "application/json"
  605. ],
  606. "tags": [
  607. "商品模块"
  608. ],
  609. "summary": "获取某个用户的所有商品",
  610. "parameters": [
  611. {
  612. "type": "integer",
  613. "description": "用户id",
  614. "name": "id",
  615. "in": "path",
  616. "required": true
  617. }
  618. ],
  619. "responses": {
  620. "200": {
  621. "description": "OK",
  622. "schema": {
  623. "$ref": "#/definitions/response.Response"
  624. }
  625. }
  626. }
  627. }
  628. },
  629. "/goods/{page}/{pageSize}": {
  630. "get": {
  631. "produces": [
  632. "application/json"
  633. ],
  634. "tags": [
  635. "商品模块"
  636. ],
  637. "summary": "获取所有商品",
  638. "parameters": [
  639. {
  640. "type": "integer",
  641. "description": "页数",
  642. "name": "page",
  643. "in": "path",
  644. "required": true
  645. },
  646. {
  647. "type": "integer",
  648. "description": "一页的大小",
  649. "name": "pageSize",
  650. "in": "path",
  651. "required": true
  652. }
  653. ],
  654. "responses": {
  655. "200": {
  656. "description": "OK",
  657. "schema": {
  658. "$ref": "#/definitions/response.Response"
  659. }
  660. }
  661. }
  662. }
  663. },
  664. "/order": {
  665. "get": {
  666. "produces": [
  667. "application/json"
  668. ],
  669. "tags": [
  670. "订单模块"
  671. ],
  672. "summary": "获取所有订单",
  673. "responses": {
  674. "200": {
  675. "description": "OK",
  676. "schema": {
  677. "$ref": "#/definitions/response.Response"
  678. }
  679. }
  680. }
  681. }
  682. },
  683. "/order/create": {
  684. "post": {
  685. "produces": [
  686. "application/json"
  687. ],
  688. "tags": [
  689. "订单模块"
  690. ],
  691. "summary": "创建订单",
  692. "parameters": [
  693. {
  694. "description": "订单信息",
  695. "name": "json",
  696. "in": "body",
  697. "required": true,
  698. "schema": {
  699. "$ref": "#/definitions/model.OrderJson"
  700. }
  701. }
  702. ],
  703. "responses": {
  704. "200": {
  705. "description": "OK",
  706. "schema": {
  707. "$ref": "#/definitions/response.Response"
  708. }
  709. }
  710. }
  711. }
  712. },
  713. "/order/delete/{id}": {
  714. "delete": {
  715. "produces": [
  716. "application/json"
  717. ],
  718. "tags": [
  719. "订单模块"
  720. ],
  721. "summary": "删除订单",
  722. "parameters": [
  723. {
  724. "type": "integer",
  725. "description": "订单id",
  726. "name": "id",
  727. "in": "path",
  728. "required": true
  729. }
  730. ],
  731. "responses": {
  732. "200": {
  733. "description": "OK",
  734. "schema": {
  735. "$ref": "#/definitions/response.Response"
  736. }
  737. }
  738. }
  739. }
  740. },
  741. "/order/revise": {
  742. "post": {
  743. "produces": [
  744. "application/json"
  745. ],
  746. "tags": [
  747. "订单模块"
  748. ],
  749. "summary": "修改订单的状态",
  750. "parameters": [
  751. {
  752. "type": "integer",
  753. "description": "订单id",
  754. "name": "id",
  755. "in": "formData",
  756. "required": true
  757. },
  758. {
  759. "type": "integer",
  760. "description": "订单状态",
  761. "name": "state",
  762. "in": "formData",
  763. "required": true
  764. }
  765. ],
  766. "responses": {
  767. "200": {
  768. "description": "OK",
  769. "schema": {
  770. "$ref": "#/definitions/response.Response"
  771. }
  772. }
  773. }
  774. }
  775. },
  776. "/order/user": {
  777. "get": {
  778. "produces": [
  779. "application/json"
  780. ],
  781. "tags": [
  782. "订单模块"
  783. ],
  784. "summary": "获取用户的所有订单",
  785. "parameters": [
  786. {
  787. "type": "integer",
  788. "description": "用户id",
  789. "name": "id",
  790. "in": "query",
  791. "required": true
  792. }
  793. ],
  794. "responses": {
  795. "200": {
  796. "description": "OK",
  797. "schema": {
  798. "$ref": "#/definitions/response.Response"
  799. }
  800. }
  801. }
  802. }
  803. },
  804. "/order/{page}/{pageSize}": {
  805. "get": {
  806. "produces": [
  807. "application/json"
  808. ],
  809. "tags": [
  810. "订单模块"
  811. ],
  812. "summary": "分页获取订单",
  813. "parameters": [
  814. {
  815. "type": "integer",
  816. "description": "页数",
  817. "name": "page",
  818. "in": "path",
  819. "required": true
  820. },
  821. {
  822. "type": "integer",
  823. "description": "一页的大小",
  824. "name": "pageSize",
  825. "in": "path",
  826. "required": true
  827. }
  828. ],
  829. "responses": {
  830. "200": {
  831. "description": "OK",
  832. "schema": {
  833. "$ref": "#/definitions/response.Response"
  834. }
  835. }
  836. }
  837. }
  838. },
  839. "/pic": {
  840. "get": {
  841. "produces": [
  842. "application/json"
  843. ],
  844. "tags": [
  845. "图片模块"
  846. ],
  847. "summary": "获取所有图片",
  848. "responses": {
  849. "200": {
  850. "description": "OK",
  851. "schema": {
  852. "$ref": "#/definitions/response.Response"
  853. }
  854. }
  855. }
  856. }
  857. },
  858. "/pic/delete/{id}": {
  859. "delete": {
  860. "produces": [
  861. "application/json"
  862. ],
  863. "tags": [
  864. "图片模块"
  865. ],
  866. "summary": "删除图片",
  867. "parameters": [
  868. {
  869. "type": "integer",
  870. "description": "图片id",
  871. "name": "id",
  872. "in": "path",
  873. "required": true
  874. }
  875. ],
  876. "responses": {
  877. "200": {
  878. "description": "OK",
  879. "schema": {
  880. "$ref": "#/definitions/response.Response"
  881. }
  882. }
  883. }
  884. }
  885. },
  886. "/pic/upload": {
  887. "post": {
  888. "consumes": [
  889. "multipart/form-data"
  890. ],
  891. "produces": [
  892. "application/json"
  893. ],
  894. "tags": [
  895. "图片模块"
  896. ],
  897. "summary": "上传图片",
  898. "parameters": [
  899. {
  900. "type": "file",
  901. "description": "图片",
  902. "name": "pic",
  903. "in": "formData",
  904. "required": true
  905. }
  906. ],
  907. "responses": {
  908. "200": {
  909. "description": "OK",
  910. "schema": {
  911. "$ref": "#/definitions/response.Response"
  912. }
  913. }
  914. }
  915. }
  916. },
  917. "/pic/{page}/{pageSize}": {
  918. "get": {
  919. "produces": [
  920. "application/json"
  921. ],
  922. "tags": [
  923. "图片模块"
  924. ],
  925. "summary": "分页获取图片",
  926. "parameters": [
  927. {
  928. "type": "integer",
  929. "description": "页数",
  930. "name": "page",
  931. "in": "path",
  932. "required": true
  933. },
  934. {
  935. "type": "integer",
  936. "description": "一页的大小",
  937. "name": "pageSize",
  938. "in": "path",
  939. "required": true
  940. }
  941. ],
  942. "responses": {
  943. "200": {
  944. "description": "OK",
  945. "schema": {
  946. "$ref": "#/definitions/response.Response"
  947. }
  948. }
  949. }
  950. }
  951. },
  952. "/relation/bad": {
  953. "get": {
  954. "produces": [
  955. "application/json"
  956. ],
  957. "tags": [
  958. "用户关系模块"
  959. ],
  960. "summary": "传入用户id获取用户黑名单列表",
  961. "parameters": [
  962. {
  963. "type": "integer",
  964. "description": "用户id",
  965. "name": "uid",
  966. "in": "query",
  967. "required": true
  968. }
  969. ],
  970. "responses": {
  971. "200": {
  972. "description": "OK",
  973. "schema": {
  974. "$ref": "#/definitions/response.Response"
  975. }
  976. }
  977. }
  978. }
  979. },
  980. "/relation/create": {
  981. "post": {
  982. "consumes": [
  983. "application/json"
  984. ],
  985. "produces": [
  986. "application/json"
  987. ],
  988. "tags": [
  989. "用户关系模块"
  990. ],
  991. "summary": "添加用户间的关系,关系类型有1:好友关系,2:黑名单关系",
  992. "parameters": [
  993. {
  994. "description": "关系数据",
  995. "name": "json",
  996. "in": "body",
  997. "required": true,
  998. "schema": {
  999. "$ref": "#/definitions/model.RelationJson"
  1000. }
  1001. }
  1002. ],
  1003. "responses": {
  1004. "200": {
  1005. "description": "OK",
  1006. "schema": {
  1007. "$ref": "#/definitions/response.Response"
  1008. }
  1009. }
  1010. }
  1011. }
  1012. },
  1013. "/relation/delete/{id}": {
  1014. "delete": {
  1015. "produces": [
  1016. "application/json"
  1017. ],
  1018. "tags": [
  1019. "用户关系模块"
  1020. ],
  1021. "summary": "根据关系id删除关系",
  1022. "parameters": [
  1023. {
  1024. "type": "integer",
  1025. "description": "关系id",
  1026. "name": "id",
  1027. "in": "path",
  1028. "required": true
  1029. }
  1030. ],
  1031. "responses": {
  1032. "200": {
  1033. "description": "OK",
  1034. "schema": {
  1035. "$ref": "#/definitions/response.Response"
  1036. }
  1037. }
  1038. }
  1039. }
  1040. },
  1041. "/relation/friend": {
  1042. "get": {
  1043. "produces": [
  1044. "application/json"
  1045. ],
  1046. "tags": [
  1047. "用户关系模块"
  1048. ],
  1049. "summary": "传入用户id获取用户好友列表",
  1050. "parameters": [
  1051. {
  1052. "type": "integer",
  1053. "description": "用户id",
  1054. "name": "uid",
  1055. "in": "query",
  1056. "required": true
  1057. }
  1058. ],
  1059. "responses": {
  1060. "200": {
  1061. "description": "OK",
  1062. "schema": {
  1063. "$ref": "#/definitions/response.Response"
  1064. }
  1065. }
  1066. }
  1067. }
  1068. },
  1069. "/relation/{page}/{pageSize}": {
  1070. "get": {
  1071. "produces": [
  1072. "application/json"
  1073. ],
  1074. "tags": [
  1075. "用户关系模块"
  1076. ],
  1077. "summary": "分页用户关系",
  1078. "parameters": [
  1079. {
  1080. "type": "integer",
  1081. "description": "页数",
  1082. "name": "page",
  1083. "in": "path",
  1084. "required": true
  1085. },
  1086. {
  1087. "type": "integer",
  1088. "description": "一页的大小",
  1089. "name": "pageSize",
  1090. "in": "path",
  1091. "required": true
  1092. }
  1093. ],
  1094. "responses": {
  1095. "200": {
  1096. "description": "OK",
  1097. "schema": {
  1098. "$ref": "#/definitions/response.Response"
  1099. }
  1100. }
  1101. }
  1102. }
  1103. },
  1104. "/user/info": {
  1105. "get": {
  1106. "produces": [
  1107. "application/json"
  1108. ],
  1109. "tags": [
  1110. "用户模块"
  1111. ],
  1112. "summary": "获取用户信息",
  1113. "responses": {
  1114. "200": {
  1115. "description": "OK",
  1116. "schema": {
  1117. "$ref": "#/definitions/response.Response"
  1118. }
  1119. }
  1120. }
  1121. }
  1122. },
  1123. "/user/login": {
  1124. "post": {
  1125. "produces": [
  1126. "application/json"
  1127. ],
  1128. "tags": [
  1129. "用户模块"
  1130. ],
  1131. "summary": "登录",
  1132. "parameters": [
  1133. {
  1134. "type": "string",
  1135. "description": "微信ID",
  1136. "name": "vid",
  1137. "in": "formData"
  1138. }
  1139. ],
  1140. "responses": {
  1141. "200": {
  1142. "description": "OK",
  1143. "schema": {
  1144. "$ref": "#/definitions/response.Response"
  1145. }
  1146. }
  1147. }
  1148. }
  1149. },
  1150. "/user/modify": {
  1151. "post": {
  1152. "consumes": [
  1153. "application/json"
  1154. ],
  1155. "produces": [
  1156. "application/json"
  1157. ],
  1158. "tags": [
  1159. "用户模块"
  1160. ],
  1161. "summary": "修改用户信息",
  1162. "parameters": [
  1163. {
  1164. "description": "用户信息",
  1165. "name": "json",
  1166. "in": "body",
  1167. "required": true,
  1168. "schema": {
  1169. "$ref": "#/definitions/model.User"
  1170. }
  1171. }
  1172. ],
  1173. "responses": {
  1174. "200": {
  1175. "description": "OK",
  1176. "schema": {
  1177. "$ref": "#/definitions/response.Response"
  1178. }
  1179. }
  1180. }
  1181. }
  1182. },
  1183. "/user/register": {
  1184. "post": {
  1185. "consumes": [
  1186. "application/json"
  1187. ],
  1188. "produces": [
  1189. "application/json"
  1190. ],
  1191. "tags": [
  1192. "用户模块"
  1193. ],
  1194. "summary": "创建用户",
  1195. "parameters": [
  1196. {
  1197. "description": "用户信息",
  1198. "name": "json",
  1199. "in": "body",
  1200. "required": true,
  1201. "schema": {
  1202. "$ref": "#/definitions/model.UserJson"
  1203. }
  1204. }
  1205. ],
  1206. "responses": {
  1207. "200": {
  1208. "description": "OK",
  1209. "schema": {
  1210. "$ref": "#/definitions/response.Response"
  1211. }
  1212. }
  1213. }
  1214. }
  1215. },
  1216. "/user/{page}/{pageSize}": {
  1217. "get": {
  1218. "produces": [
  1219. "application/json"
  1220. ],
  1221. "tags": [
  1222. "用户模块"
  1223. ],
  1224. "summary": "分页用户信息",
  1225. "parameters": [
  1226. {
  1227. "type": "integer",
  1228. "description": "页数",
  1229. "name": "page",
  1230. "in": "path",
  1231. "required": true
  1232. },
  1233. {
  1234. "type": "integer",
  1235. "description": "一页的大小",
  1236. "name": "pageSize",
  1237. "in": "path",
  1238. "required": true
  1239. }
  1240. ],
  1241. "responses": {
  1242. "200": {
  1243. "description": "OK",
  1244. "schema": {
  1245. "$ref": "#/definitions/response.Response"
  1246. }
  1247. }
  1248. }
  1249. }
  1250. }
  1251. },
  1252. "definitions": {
  1253. "model.Appraise": {
  1254. "type": "object",
  1255. "properties": {
  1256. "buyerId": {
  1257. "type": "integer"
  1258. },
  1259. "content": {
  1260. "type": "string"
  1261. },
  1262. "goodsId": {
  1263. "type": "integer"
  1264. },
  1265. "id": {
  1266. "type": "integer"
  1267. },
  1268. "star": {
  1269. "type": "integer"
  1270. },
  1271. "time": {
  1272. "type": "integer"
  1273. }
  1274. }
  1275. },
  1276. "model.AppraiseJson": {
  1277. "type": "object",
  1278. "properties": {
  1279. "buyerId": {
  1280. "type": "integer"
  1281. },
  1282. "content": {
  1283. "type": "string"
  1284. },
  1285. "goodsId": {
  1286. "type": "integer"
  1287. },
  1288. "star": {
  1289. "type": "integer"
  1290. },
  1291. "time": {
  1292. "type": "integer"
  1293. }
  1294. }
  1295. },
  1296. "model.CategoryJson": {
  1297. "type": "object",
  1298. "properties": {
  1299. "name": {
  1300. "type": "string"
  1301. },
  1302. "pic": {
  1303. "type": "string"
  1304. }
  1305. }
  1306. },
  1307. "model.Goods": {
  1308. "type": "object",
  1309. "properties": {
  1310. "desc": {
  1311. "type": "string"
  1312. },
  1313. "id": {
  1314. "type": "integer"
  1315. },
  1316. "integrity": {
  1317. "type": "integer"
  1318. },
  1319. "ownerId": {
  1320. "type": "integer"
  1321. },
  1322. "picId": {
  1323. "type": "integer"
  1324. },
  1325. "place": {
  1326. "type": "string"
  1327. },
  1328. "price": {
  1329. "type": "integer"
  1330. },
  1331. "state": {
  1332. "type": "integer"
  1333. },
  1334. "title": {
  1335. "type": "string"
  1336. }
  1337. }
  1338. },
  1339. "model.GoodsJson": {
  1340. "type": "object",
  1341. "properties": {
  1342. "categories": {
  1343. "type": "array",
  1344. "items": {
  1345. "type": "integer"
  1346. }
  1347. },
  1348. "desc": {
  1349. "type": "string"
  1350. },
  1351. "integrity": {
  1352. "type": "integer"
  1353. },
  1354. "ownerId": {
  1355. "type": "integer"
  1356. },
  1357. "pic_id": {
  1358. "type": "integer"
  1359. },
  1360. "place": {
  1361. "type": "string"
  1362. },
  1363. "price": {
  1364. "type": "integer"
  1365. },
  1366. "state": {
  1367. "type": "integer"
  1368. },
  1369. "title": {
  1370. "type": "string"
  1371. }
  1372. }
  1373. },
  1374. "model.OrderJson": {
  1375. "type": "object",
  1376. "properties": {
  1377. "buyerId": {
  1378. "type": "integer"
  1379. },
  1380. "goodsId": {
  1381. "type": "integer"
  1382. },
  1383. "phone": {
  1384. "type": "string"
  1385. },
  1386. "place": {
  1387. "type": "string"
  1388. },
  1389. "state": {
  1390. "type": "integer"
  1391. },
  1392. "time": {
  1393. "type": "integer"
  1394. }
  1395. }
  1396. },
  1397. "model.RelationJson": {
  1398. "type": "object",
  1399. "properties": {
  1400. "owner": {
  1401. "type": "integer"
  1402. },
  1403. "target": {
  1404. "type": "integer"
  1405. },
  1406. "type": {
  1407. "type": "integer"
  1408. }
  1409. }
  1410. },
  1411. "model.User": {
  1412. "type": "object",
  1413. "properties": {
  1414. "avatar": {
  1415. "type": "string"
  1416. },
  1417. "name": {
  1418. "type": "string"
  1419. },
  1420. "phone": {
  1421. "type": "string"
  1422. },
  1423. "sign": {
  1424. "type": "string"
  1425. },
  1426. "uid": {
  1427. "type": "integer"
  1428. },
  1429. "vid": {
  1430. "type": "string"
  1431. }
  1432. }
  1433. },
  1434. "model.UserJson": {
  1435. "type": "object",
  1436. "properties": {
  1437. "avatar": {
  1438. "type": "string"
  1439. },
  1440. "name": {
  1441. "type": "string"
  1442. },
  1443. "phone": {
  1444. "type": "string"
  1445. },
  1446. "sign": {
  1447. "type": "string"
  1448. },
  1449. "vid": {
  1450. "type": "string"
  1451. }
  1452. }
  1453. },
  1454. "response.Response": {
  1455. "type": "object",
  1456. "properties": {
  1457. "code": {
  1458. "type": "integer"
  1459. },
  1460. "data": {},
  1461. "message": {
  1462. "type": "string"
  1463. }
  1464. }
  1465. }
  1466. }
  1467. }`
  1468. // SwaggerInfo holds exported Swagger Info so clients can modify it
  1469. var SwaggerInfo = &swag.Spec{
  1470. Version: "1.0",
  1471. Host: "192.168.31.28:8084",
  1472. BasePath: "/WeChatTrading/trading-go",
  1473. Schemes: []string{},
  1474. Title: "二手交易",
  1475. Description: "一个基于微信小程序的校园二手交易平台的api文档",
  1476. InfoInstanceName: "swagger",
  1477. SwaggerTemplate: docTemplate,
  1478. LeftDelim: "{{",
  1479. RightDelim: "}}",
  1480. }
  1481. func init() {
  1482. swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
  1483. }