docs.go 44 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447
  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": {
  272. "get": {
  273. "tags": [
  274. "聊天模块"
  275. ],
  276. "summary": "获取未过期且来源为特定用户的聊天记录",
  277. "parameters": [
  278. {
  279. "type": "string",
  280. "description": "用户id",
  281. "name": "uid",
  282. "in": "query",
  283. "required": true
  284. }
  285. ],
  286. "responses": {
  287. "200": {
  288. "description": "OK",
  289. "schema": {
  290. "$ref": "#/definitions/response.Response"
  291. }
  292. }
  293. }
  294. }
  295. },
  296. "/chat/to": {
  297. "get": {
  298. "tags": [
  299. "聊天模块"
  300. ],
  301. "summary": "获取未过期且目标为特定用户的聊天记录",
  302. "parameters": [
  303. {
  304. "type": "string",
  305. "description": "用户id",
  306. "name": "uid",
  307. "in": "query",
  308. "required": true
  309. }
  310. ],
  311. "responses": {
  312. "200": {
  313. "description": "OK",
  314. "schema": {
  315. "$ref": "#/definitions/response.Response"
  316. }
  317. }
  318. }
  319. }
  320. },
  321. "/goods/category/{page}/{pageSize}": {
  322. "get": {
  323. "produces": [
  324. "application/json"
  325. ],
  326. "tags": [
  327. "商品模块"
  328. ],
  329. "summary": "按分类查找商品并分页显示",
  330. "parameters": [
  331. {
  332. "type": "integer",
  333. "description": "页数",
  334. "name": "page",
  335. "in": "path",
  336. "required": true
  337. },
  338. {
  339. "type": "integer",
  340. "description": "一页的大小",
  341. "name": "pageSize",
  342. "in": "path",
  343. "required": true
  344. },
  345. {
  346. "type": "integer",
  347. "description": "商品分类id",
  348. "name": "category",
  349. "in": "query",
  350. "required": true
  351. }
  352. ],
  353. "responses": {
  354. "200": {
  355. "description": "OK",
  356. "schema": {
  357. "$ref": "#/definitions/response.Response"
  358. }
  359. }
  360. }
  361. }
  362. },
  363. "/goods/create": {
  364. "post": {
  365. "consumes": [
  366. "application/json"
  367. ],
  368. "produces": [
  369. "application/json"
  370. ],
  371. "tags": [
  372. "商品模块"
  373. ],
  374. "summary": "创建商品",
  375. "parameters": [
  376. {
  377. "description": "商品信息",
  378. "name": "json",
  379. "in": "body",
  380. "required": true,
  381. "schema": {
  382. "$ref": "#/definitions/model.GoodsJson"
  383. }
  384. }
  385. ],
  386. "responses": {
  387. "200": {
  388. "description": "OK",
  389. "schema": {
  390. "$ref": "#/definitions/response.Response"
  391. }
  392. }
  393. }
  394. }
  395. },
  396. "/goods/delete/{id}": {
  397. "delete": {
  398. "produces": [
  399. "application/json"
  400. ],
  401. "tags": [
  402. "商品模块"
  403. ],
  404. "summary": "删除商品",
  405. "parameters": [
  406. {
  407. "type": "integer",
  408. "description": "商品id",
  409. "name": "id",
  410. "in": "path",
  411. "required": true
  412. }
  413. ],
  414. "responses": {
  415. "200": {
  416. "description": "OK",
  417. "schema": {
  418. "$ref": "#/definitions/response.Response"
  419. }
  420. }
  421. }
  422. }
  423. },
  424. "/goods/detail/{id}": {
  425. "get": {
  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/recommend/{page}/{pageSize}": {
  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": "query",
  467. "required": true
  468. },
  469. {
  470. "type": "integer",
  471. "description": "页数",
  472. "name": "page",
  473. "in": "path",
  474. "required": true
  475. },
  476. {
  477. "type": "integer",
  478. "description": "一页的大小",
  479. "name": "pageSize",
  480. "in": "path",
  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/revise": {
  495. "post": {
  496. "produces": [
  497. "application/json"
  498. ],
  499. "tags": [
  500. "商品模块"
  501. ],
  502. "summary": "修改商品信息",
  503. "parameters": [
  504. {
  505. "description": "商品信息",
  506. "name": "json",
  507. "in": "body",
  508. "required": true,
  509. "schema": {
  510. "$ref": "#/definitions/model.Goods"
  511. }
  512. }
  513. ],
  514. "responses": {
  515. "200": {
  516. "description": "OK",
  517. "schema": {
  518. "$ref": "#/definitions/response.Response"
  519. }
  520. }
  521. }
  522. }
  523. },
  524. "/goods/search/{page}/{pageSize}": {
  525. "get": {
  526. "produces": [
  527. "application/json"
  528. ],
  529. "tags": [
  530. "商品模块"
  531. ],
  532. "summary": "搜索商品并分页显示",
  533. "parameters": [
  534. {
  535. "type": "integer",
  536. "description": "页数",
  537. "name": "page",
  538. "in": "path",
  539. "required": true
  540. },
  541. {
  542. "type": "integer",
  543. "description": "一页的大小",
  544. "name": "pageSize",
  545. "in": "path",
  546. "required": true
  547. },
  548. {
  549. "type": "string",
  550. "description": "搜素关键词",
  551. "name": "keyword",
  552. "in": "query",
  553. "required": true
  554. }
  555. ],
  556. "responses": {
  557. "200": {
  558. "description": "OK",
  559. "schema": {
  560. "$ref": "#/definitions/response.Response"
  561. }
  562. }
  563. }
  564. }
  565. },
  566. "/goods/user/{id}": {
  567. "get": {
  568. "produces": [
  569. "application/json"
  570. ],
  571. "tags": [
  572. "商品模块"
  573. ],
  574. "summary": "获取某个用户的所有商品",
  575. "parameters": [
  576. {
  577. "type": "integer",
  578. "description": "用户id",
  579. "name": "id",
  580. "in": "path",
  581. "required": true
  582. }
  583. ],
  584. "responses": {
  585. "200": {
  586. "description": "OK",
  587. "schema": {
  588. "$ref": "#/definitions/response.Response"
  589. }
  590. }
  591. }
  592. }
  593. },
  594. "/goods/{page}/{pageSize}": {
  595. "get": {
  596. "produces": [
  597. "application/json"
  598. ],
  599. "tags": [
  600. "商品模块"
  601. ],
  602. "summary": "获取所有商品",
  603. "parameters": [
  604. {
  605. "type": "integer",
  606. "description": "页数",
  607. "name": "page",
  608. "in": "path",
  609. "required": true
  610. },
  611. {
  612. "type": "integer",
  613. "description": "一页的大小",
  614. "name": "pageSize",
  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. "/order": {
  630. "get": {
  631. "produces": [
  632. "application/json"
  633. ],
  634. "tags": [
  635. "订单模块"
  636. ],
  637. "summary": "获取所有订单",
  638. "responses": {
  639. "200": {
  640. "description": "OK",
  641. "schema": {
  642. "$ref": "#/definitions/response.Response"
  643. }
  644. }
  645. }
  646. }
  647. },
  648. "/order/create": {
  649. "post": {
  650. "produces": [
  651. "application/json"
  652. ],
  653. "tags": [
  654. "订单模块"
  655. ],
  656. "summary": "创建订单",
  657. "parameters": [
  658. {
  659. "description": "订单信息",
  660. "name": "json",
  661. "in": "body",
  662. "required": true,
  663. "schema": {
  664. "$ref": "#/definitions/model.OrderJson"
  665. }
  666. }
  667. ],
  668. "responses": {
  669. "200": {
  670. "description": "OK",
  671. "schema": {
  672. "$ref": "#/definitions/response.Response"
  673. }
  674. }
  675. }
  676. }
  677. },
  678. "/order/delete/{id}": {
  679. "delete": {
  680. "produces": [
  681. "application/json"
  682. ],
  683. "tags": [
  684. "订单模块"
  685. ],
  686. "summary": "删除订单",
  687. "parameters": [
  688. {
  689. "type": "integer",
  690. "description": "订单id",
  691. "name": "id",
  692. "in": "path",
  693. "required": true
  694. }
  695. ],
  696. "responses": {
  697. "200": {
  698. "description": "OK",
  699. "schema": {
  700. "$ref": "#/definitions/response.Response"
  701. }
  702. }
  703. }
  704. }
  705. },
  706. "/order/revise": {
  707. "post": {
  708. "produces": [
  709. "application/json"
  710. ],
  711. "tags": [
  712. "订单模块"
  713. ],
  714. "summary": "修改订单的状态",
  715. "parameters": [
  716. {
  717. "type": "integer",
  718. "description": "订单id",
  719. "name": "id",
  720. "in": "formData",
  721. "required": true
  722. },
  723. {
  724. "type": "integer",
  725. "description": "订单状态",
  726. "name": "state",
  727. "in": "formData",
  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/user": {
  742. "get": {
  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": "query",
  756. "required": true
  757. }
  758. ],
  759. "responses": {
  760. "200": {
  761. "description": "OK",
  762. "schema": {
  763. "$ref": "#/definitions/response.Response"
  764. }
  765. }
  766. }
  767. }
  768. },
  769. "/order/{page}/{pageSize}": {
  770. "get": {
  771. "produces": [
  772. "application/json"
  773. ],
  774. "tags": [
  775. "订单模块"
  776. ],
  777. "summary": "分页获取订单",
  778. "parameters": [
  779. {
  780. "type": "integer",
  781. "description": "页数",
  782. "name": "page",
  783. "in": "path",
  784. "required": true
  785. },
  786. {
  787. "type": "integer",
  788. "description": "一页的大小",
  789. "name": "pageSize",
  790. "in": "path",
  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. "/pic": {
  805. "get": {
  806. "produces": [
  807. "application/json"
  808. ],
  809. "tags": [
  810. "图片模块"
  811. ],
  812. "summary": "获取所有图片",
  813. "responses": {
  814. "200": {
  815. "description": "OK",
  816. "schema": {
  817. "$ref": "#/definitions/response.Response"
  818. }
  819. }
  820. }
  821. }
  822. },
  823. "/pic/delete/{id}": {
  824. "delete": {
  825. "produces": [
  826. "application/json"
  827. ],
  828. "tags": [
  829. "图片模块"
  830. ],
  831. "summary": "删除图片",
  832. "parameters": [
  833. {
  834. "type": "integer",
  835. "description": "图片id",
  836. "name": "id",
  837. "in": "path",
  838. "required": true
  839. }
  840. ],
  841. "responses": {
  842. "200": {
  843. "description": "OK",
  844. "schema": {
  845. "$ref": "#/definitions/response.Response"
  846. }
  847. }
  848. }
  849. }
  850. },
  851. "/pic/upload": {
  852. "post": {
  853. "consumes": [
  854. "multipart/form-data"
  855. ],
  856. "produces": [
  857. "application/json"
  858. ],
  859. "tags": [
  860. "图片模块"
  861. ],
  862. "summary": "上传图片",
  863. "parameters": [
  864. {
  865. "type": "file",
  866. "description": "图片",
  867. "name": "pic",
  868. "in": "formData",
  869. "required": true
  870. }
  871. ],
  872. "responses": {
  873. "200": {
  874. "description": "OK",
  875. "schema": {
  876. "$ref": "#/definitions/response.Response"
  877. }
  878. }
  879. }
  880. }
  881. },
  882. "/pic/{page}/{pageSize}": {
  883. "get": {
  884. "produces": [
  885. "application/json"
  886. ],
  887. "tags": [
  888. "图片模块"
  889. ],
  890. "summary": "分页获取图片",
  891. "parameters": [
  892. {
  893. "type": "integer",
  894. "description": "页数",
  895. "name": "page",
  896. "in": "path",
  897. "required": true
  898. },
  899. {
  900. "type": "integer",
  901. "description": "一页的大小",
  902. "name": "pageSize",
  903. "in": "path",
  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. "/relation/bad": {
  918. "get": {
  919. "produces": [
  920. "application/json"
  921. ],
  922. "tags": [
  923. "用户关系模块"
  924. ],
  925. "summary": "传入用户id获取用户黑名单列表",
  926. "parameters": [
  927. {
  928. "type": "integer",
  929. "description": "用户id",
  930. "name": "uid",
  931. "in": "query",
  932. "required": true
  933. }
  934. ],
  935. "responses": {
  936. "200": {
  937. "description": "OK",
  938. "schema": {
  939. "$ref": "#/definitions/response.Response"
  940. }
  941. }
  942. }
  943. }
  944. },
  945. "/relation/create": {
  946. "post": {
  947. "consumes": [
  948. "application/json"
  949. ],
  950. "produces": [
  951. "application/json"
  952. ],
  953. "tags": [
  954. "用户关系模块"
  955. ],
  956. "summary": "添加用户间的关系,关系类型有1:好友关系,2:黑名单关系",
  957. "parameters": [
  958. {
  959. "description": "关系数据",
  960. "name": "json",
  961. "in": "body",
  962. "required": true,
  963. "schema": {
  964. "$ref": "#/definitions/model.RelationJson"
  965. }
  966. }
  967. ],
  968. "responses": {
  969. "200": {
  970. "description": "OK",
  971. "schema": {
  972. "$ref": "#/definitions/response.Response"
  973. }
  974. }
  975. }
  976. }
  977. },
  978. "/relation/delete/{id}": {
  979. "delete": {
  980. "produces": [
  981. "application/json"
  982. ],
  983. "tags": [
  984. "用户关系模块"
  985. ],
  986. "summary": "根据关系id删除关系",
  987. "parameters": [
  988. {
  989. "type": "integer",
  990. "description": "关系id",
  991. "name": "id",
  992. "in": "path",
  993. "required": true
  994. }
  995. ],
  996. "responses": {
  997. "200": {
  998. "description": "OK",
  999. "schema": {
  1000. "$ref": "#/definitions/response.Response"
  1001. }
  1002. }
  1003. }
  1004. }
  1005. },
  1006. "/relation/friend": {
  1007. "get": {
  1008. "produces": [
  1009. "application/json"
  1010. ],
  1011. "tags": [
  1012. "用户关系模块"
  1013. ],
  1014. "summary": "传入用户id获取用户好友列表",
  1015. "parameters": [
  1016. {
  1017. "type": "integer",
  1018. "description": "用户id",
  1019. "name": "uid",
  1020. "in": "query",
  1021. "required": true
  1022. }
  1023. ],
  1024. "responses": {
  1025. "200": {
  1026. "description": "OK",
  1027. "schema": {
  1028. "$ref": "#/definitions/response.Response"
  1029. }
  1030. }
  1031. }
  1032. }
  1033. },
  1034. "/relation/{page}/{pageSize}": {
  1035. "get": {
  1036. "produces": [
  1037. "application/json"
  1038. ],
  1039. "tags": [
  1040. "用户关系模块"
  1041. ],
  1042. "summary": "分页用户关系",
  1043. "parameters": [
  1044. {
  1045. "type": "integer",
  1046. "description": "页数",
  1047. "name": "page",
  1048. "in": "path",
  1049. "required": true
  1050. },
  1051. {
  1052. "type": "integer",
  1053. "description": "一页的大小",
  1054. "name": "pageSize",
  1055. "in": "path",
  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. "/user/info": {
  1070. "get": {
  1071. "produces": [
  1072. "application/json"
  1073. ],
  1074. "tags": [
  1075. "用户模块"
  1076. ],
  1077. "summary": "获取用户信息",
  1078. "responses": {
  1079. "200": {
  1080. "description": "OK",
  1081. "schema": {
  1082. "$ref": "#/definitions/response.Response"
  1083. }
  1084. }
  1085. }
  1086. }
  1087. },
  1088. "/user/login": {
  1089. "post": {
  1090. "produces": [
  1091. "application/json"
  1092. ],
  1093. "tags": [
  1094. "用户模块"
  1095. ],
  1096. "summary": "登录",
  1097. "parameters": [
  1098. {
  1099. "type": "string",
  1100. "description": "微信ID",
  1101. "name": "vid",
  1102. "in": "formData"
  1103. }
  1104. ],
  1105. "responses": {
  1106. "200": {
  1107. "description": "OK",
  1108. "schema": {
  1109. "$ref": "#/definitions/response.Response"
  1110. }
  1111. }
  1112. }
  1113. }
  1114. },
  1115. "/user/modify": {
  1116. "post": {
  1117. "consumes": [
  1118. "application/json"
  1119. ],
  1120. "produces": [
  1121. "application/json"
  1122. ],
  1123. "tags": [
  1124. "用户模块"
  1125. ],
  1126. "summary": "修改用户信息",
  1127. "parameters": [
  1128. {
  1129. "description": "用户信息",
  1130. "name": "json",
  1131. "in": "body",
  1132. "required": true,
  1133. "schema": {
  1134. "$ref": "#/definitions/model.User"
  1135. }
  1136. }
  1137. ],
  1138. "responses": {
  1139. "200": {
  1140. "description": "OK",
  1141. "schema": {
  1142. "$ref": "#/definitions/response.Response"
  1143. }
  1144. }
  1145. }
  1146. }
  1147. },
  1148. "/user/register": {
  1149. "post": {
  1150. "consumes": [
  1151. "application/json"
  1152. ],
  1153. "produces": [
  1154. "application/json"
  1155. ],
  1156. "tags": [
  1157. "用户模块"
  1158. ],
  1159. "summary": "创建用户",
  1160. "parameters": [
  1161. {
  1162. "description": "用户信息",
  1163. "name": "json",
  1164. "in": "body",
  1165. "required": true,
  1166. "schema": {
  1167. "$ref": "#/definitions/model.UserJson"
  1168. }
  1169. }
  1170. ],
  1171. "responses": {
  1172. "200": {
  1173. "description": "OK",
  1174. "schema": {
  1175. "$ref": "#/definitions/response.Response"
  1176. }
  1177. }
  1178. }
  1179. }
  1180. },
  1181. "/user/{page}/{pageSize}": {
  1182. "get": {
  1183. "produces": [
  1184. "application/json"
  1185. ],
  1186. "tags": [
  1187. "用户模块"
  1188. ],
  1189. "summary": "分页用户信息",
  1190. "parameters": [
  1191. {
  1192. "type": "integer",
  1193. "description": "页数",
  1194. "name": "page",
  1195. "in": "path",
  1196. "required": true
  1197. },
  1198. {
  1199. "type": "integer",
  1200. "description": "一页的大小",
  1201. "name": "pageSize",
  1202. "in": "path",
  1203. "required": true
  1204. }
  1205. ],
  1206. "responses": {
  1207. "200": {
  1208. "description": "OK",
  1209. "schema": {
  1210. "$ref": "#/definitions/response.Response"
  1211. }
  1212. }
  1213. }
  1214. }
  1215. }
  1216. },
  1217. "definitions": {
  1218. "model.Appraise": {
  1219. "type": "object",
  1220. "properties": {
  1221. "buyerId": {
  1222. "type": "integer"
  1223. },
  1224. "content": {
  1225. "type": "string"
  1226. },
  1227. "goodsId": {
  1228. "type": "integer"
  1229. },
  1230. "id": {
  1231. "type": "integer"
  1232. },
  1233. "star": {
  1234. "type": "integer"
  1235. },
  1236. "time": {
  1237. "type": "integer"
  1238. }
  1239. }
  1240. },
  1241. "model.AppraiseJson": {
  1242. "type": "object",
  1243. "properties": {
  1244. "buyerId": {
  1245. "type": "integer"
  1246. },
  1247. "content": {
  1248. "type": "string"
  1249. },
  1250. "goodsId": {
  1251. "type": "integer"
  1252. },
  1253. "star": {
  1254. "type": "integer"
  1255. },
  1256. "time": {
  1257. "type": "integer"
  1258. }
  1259. }
  1260. },
  1261. "model.CategoryJson": {
  1262. "type": "object",
  1263. "properties": {
  1264. "name": {
  1265. "type": "string"
  1266. },
  1267. "pic": {
  1268. "type": "string"
  1269. }
  1270. }
  1271. },
  1272. "model.Goods": {
  1273. "type": "object",
  1274. "properties": {
  1275. "desc": {
  1276. "type": "string"
  1277. },
  1278. "id": {
  1279. "type": "integer"
  1280. },
  1281. "integrity": {
  1282. "type": "integer"
  1283. },
  1284. "ownerId": {
  1285. "type": "integer"
  1286. },
  1287. "picId": {
  1288. "type": "integer"
  1289. },
  1290. "place": {
  1291. "type": "string"
  1292. },
  1293. "price": {
  1294. "type": "integer"
  1295. },
  1296. "state": {
  1297. "type": "integer"
  1298. },
  1299. "title": {
  1300. "type": "string"
  1301. }
  1302. }
  1303. },
  1304. "model.GoodsJson": {
  1305. "type": "object",
  1306. "properties": {
  1307. "categories": {
  1308. "type": "array",
  1309. "items": {
  1310. "type": "integer"
  1311. }
  1312. },
  1313. "desc": {
  1314. "type": "string"
  1315. },
  1316. "integrity": {
  1317. "type": "integer"
  1318. },
  1319. "ownerId": {
  1320. "type": "integer"
  1321. },
  1322. "pic_id": {
  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.OrderJson": {
  1340. "type": "object",
  1341. "properties": {
  1342. "buyerId": {
  1343. "type": "integer"
  1344. },
  1345. "goodsId": {
  1346. "type": "integer"
  1347. },
  1348. "phone": {
  1349. "type": "string"
  1350. },
  1351. "place": {
  1352. "type": "string"
  1353. },
  1354. "state": {
  1355. "type": "integer"
  1356. },
  1357. "time": {
  1358. "type": "integer"
  1359. }
  1360. }
  1361. },
  1362. "model.RelationJson": {
  1363. "type": "object",
  1364. "properties": {
  1365. "owner": {
  1366. "type": "integer"
  1367. },
  1368. "target": {
  1369. "type": "integer"
  1370. },
  1371. "type": {
  1372. "type": "integer"
  1373. }
  1374. }
  1375. },
  1376. "model.User": {
  1377. "type": "object",
  1378. "properties": {
  1379. "avatar": {
  1380. "type": "string"
  1381. },
  1382. "name": {
  1383. "type": "string"
  1384. },
  1385. "phone": {
  1386. "type": "string"
  1387. },
  1388. "uid": {
  1389. "type": "integer"
  1390. },
  1391. "vid": {
  1392. "type": "string"
  1393. }
  1394. }
  1395. },
  1396. "model.UserJson": {
  1397. "type": "object",
  1398. "properties": {
  1399. "avatar": {
  1400. "type": "string"
  1401. },
  1402. "name": {
  1403. "type": "string"
  1404. },
  1405. "phone": {
  1406. "type": "string"
  1407. },
  1408. "vid": {
  1409. "type": "string"
  1410. }
  1411. }
  1412. },
  1413. "response.Response": {
  1414. "type": "object",
  1415. "properties": {
  1416. "code": {
  1417. "type": "integer"
  1418. },
  1419. "data": {},
  1420. "message": {
  1421. "type": "string"
  1422. }
  1423. }
  1424. }
  1425. }
  1426. }`
  1427. // SwaggerInfo holds exported Swagger Info so clients can modify it
  1428. var SwaggerInfo = &swag.Spec{
  1429. Version: "1.0",
  1430. Host: "127.0.0.1:8084",
  1431. BasePath: "/WeChatTrading/trading-go",
  1432. Schemes: []string{},
  1433. Title: "二手交易",
  1434. Description: "一个基于微信小程序的校园二手交易平台的api文档",
  1435. InfoInstanceName: "swagger",
  1436. SwaggerTemplate: docTemplate,
  1437. LeftDelim: "{{",
  1438. RightDelim: "}}",
  1439. }
  1440. func init() {
  1441. swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
  1442. }