docs.go 45 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475
  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. "responses": {
  471. "200": {
  472. "description": "OK",
  473. "schema": {
  474. "$ref": "#/definitions/response.Response"
  475. }
  476. }
  477. }
  478. }
  479. },
  480. "/goods/recommend/{page}/{pageSize}": {
  481. "get": {
  482. "produces": [
  483. "application/json"
  484. ],
  485. "tags": [
  486. "商品模块"
  487. ],
  488. "summary": "分页获取推荐商品",
  489. "parameters": [
  490. {
  491. "type": "integer",
  492. "description": "用户id",
  493. "name": "id",
  494. "in": "query",
  495. "required": true
  496. },
  497. {
  498. "type": "integer",
  499. "description": "页数",
  500. "name": "page",
  501. "in": "path",
  502. "required": true
  503. },
  504. {
  505. "type": "integer",
  506. "description": "一页的大小",
  507. "name": "pageSize",
  508. "in": "path",
  509. "required": true
  510. }
  511. ],
  512. "responses": {
  513. "200": {
  514. "description": "OK",
  515. "schema": {
  516. "$ref": "#/definitions/response.Response"
  517. }
  518. }
  519. }
  520. }
  521. },
  522. "/goods/revise": {
  523. "post": {
  524. "produces": [
  525. "application/json"
  526. ],
  527. "tags": [
  528. "商品模块"
  529. ],
  530. "summary": "修改商品信息",
  531. "parameters": [
  532. {
  533. "description": "商品信息",
  534. "name": "json",
  535. "in": "body",
  536. "required": true,
  537. "schema": {
  538. "$ref": "#/definitions/model.Goods"
  539. }
  540. }
  541. ],
  542. "responses": {
  543. "200": {
  544. "description": "OK",
  545. "schema": {
  546. "$ref": "#/definitions/response.Response"
  547. }
  548. }
  549. }
  550. }
  551. },
  552. "/goods/search/{page}/{pageSize}": {
  553. "get": {
  554. "produces": [
  555. "application/json"
  556. ],
  557. "tags": [
  558. "商品模块"
  559. ],
  560. "summary": "搜索商品并分页显示",
  561. "parameters": [
  562. {
  563. "type": "integer",
  564. "description": "页数",
  565. "name": "page",
  566. "in": "path",
  567. "required": true
  568. },
  569. {
  570. "type": "integer",
  571. "description": "一页的大小",
  572. "name": "pageSize",
  573. "in": "path",
  574. "required": true
  575. },
  576. {
  577. "type": "string",
  578. "description": "搜素关键词",
  579. "name": "keyword",
  580. "in": "query",
  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/user/{id}": {
  595. "get": {
  596. "produces": [
  597. "application/json"
  598. ],
  599. "tags": [
  600. "商品模块"
  601. ],
  602. "summary": "获取某个用户的所有商品",
  603. "parameters": [
  604. {
  605. "type": "integer",
  606. "description": "用户id",
  607. "name": "id",
  608. "in": "path",
  609. "required": true
  610. }
  611. ],
  612. "responses": {
  613. "200": {
  614. "description": "OK",
  615. "schema": {
  616. "$ref": "#/definitions/response.Response"
  617. }
  618. }
  619. }
  620. }
  621. },
  622. "/goods/{page}/{pageSize}": {
  623. "get": {
  624. "produces": [
  625. "application/json"
  626. ],
  627. "tags": [
  628. "商品模块"
  629. ],
  630. "summary": "获取所有商品",
  631. "parameters": [
  632. {
  633. "type": "integer",
  634. "description": "页数",
  635. "name": "page",
  636. "in": "path",
  637. "required": true
  638. },
  639. {
  640. "type": "integer",
  641. "description": "一页的大小",
  642. "name": "pageSize",
  643. "in": "path",
  644. "required": true
  645. }
  646. ],
  647. "responses": {
  648. "200": {
  649. "description": "OK",
  650. "schema": {
  651. "$ref": "#/definitions/response.Response"
  652. }
  653. }
  654. }
  655. }
  656. },
  657. "/order": {
  658. "get": {
  659. "produces": [
  660. "application/json"
  661. ],
  662. "tags": [
  663. "订单模块"
  664. ],
  665. "summary": "获取所有订单",
  666. "responses": {
  667. "200": {
  668. "description": "OK",
  669. "schema": {
  670. "$ref": "#/definitions/response.Response"
  671. }
  672. }
  673. }
  674. }
  675. },
  676. "/order/create": {
  677. "post": {
  678. "produces": [
  679. "application/json"
  680. ],
  681. "tags": [
  682. "订单模块"
  683. ],
  684. "summary": "创建订单",
  685. "parameters": [
  686. {
  687. "description": "订单信息",
  688. "name": "json",
  689. "in": "body",
  690. "required": true,
  691. "schema": {
  692. "$ref": "#/definitions/model.OrderJson"
  693. }
  694. }
  695. ],
  696. "responses": {
  697. "200": {
  698. "description": "OK",
  699. "schema": {
  700. "$ref": "#/definitions/response.Response"
  701. }
  702. }
  703. }
  704. }
  705. },
  706. "/order/delete/{id}": {
  707. "delete": {
  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": "path",
  721. "required": true
  722. }
  723. ],
  724. "responses": {
  725. "200": {
  726. "description": "OK",
  727. "schema": {
  728. "$ref": "#/definitions/response.Response"
  729. }
  730. }
  731. }
  732. }
  733. },
  734. "/order/revise": {
  735. "post": {
  736. "produces": [
  737. "application/json"
  738. ],
  739. "tags": [
  740. "订单模块"
  741. ],
  742. "summary": "修改订单的状态",
  743. "parameters": [
  744. {
  745. "type": "integer",
  746. "description": "订单id",
  747. "name": "id",
  748. "in": "formData",
  749. "required": true
  750. },
  751. {
  752. "type": "integer",
  753. "description": "订单状态",
  754. "name": "state",
  755. "in": "formData",
  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/user": {
  770. "get": {
  771. "produces": [
  772. "application/json"
  773. ],
  774. "tags": [
  775. "订单模块"
  776. ],
  777. "summary": "获取用户的所有订单",
  778. "parameters": [
  779. {
  780. "type": "integer",
  781. "description": "用户id",
  782. "name": "id",
  783. "in": "query",
  784. "required": true
  785. }
  786. ],
  787. "responses": {
  788. "200": {
  789. "description": "OK",
  790. "schema": {
  791. "$ref": "#/definitions/response.Response"
  792. }
  793. }
  794. }
  795. }
  796. },
  797. "/order/{page}/{pageSize}": {
  798. "get": {
  799. "produces": [
  800. "application/json"
  801. ],
  802. "tags": [
  803. "订单模块"
  804. ],
  805. "summary": "分页获取订单",
  806. "parameters": [
  807. {
  808. "type": "integer",
  809. "description": "页数",
  810. "name": "page",
  811. "in": "path",
  812. "required": true
  813. },
  814. {
  815. "type": "integer",
  816. "description": "一页的大小",
  817. "name": "pageSize",
  818. "in": "path",
  819. "required": true
  820. }
  821. ],
  822. "responses": {
  823. "200": {
  824. "description": "OK",
  825. "schema": {
  826. "$ref": "#/definitions/response.Response"
  827. }
  828. }
  829. }
  830. }
  831. },
  832. "/pic": {
  833. "get": {
  834. "produces": [
  835. "application/json"
  836. ],
  837. "tags": [
  838. "图片模块"
  839. ],
  840. "summary": "获取所有图片",
  841. "responses": {
  842. "200": {
  843. "description": "OK",
  844. "schema": {
  845. "$ref": "#/definitions/response.Response"
  846. }
  847. }
  848. }
  849. }
  850. },
  851. "/pic/delete/{id}": {
  852. "delete": {
  853. "produces": [
  854. "application/json"
  855. ],
  856. "tags": [
  857. "图片模块"
  858. ],
  859. "summary": "删除图片",
  860. "parameters": [
  861. {
  862. "type": "integer",
  863. "description": "图片id",
  864. "name": "id",
  865. "in": "path",
  866. "required": true
  867. }
  868. ],
  869. "responses": {
  870. "200": {
  871. "description": "OK",
  872. "schema": {
  873. "$ref": "#/definitions/response.Response"
  874. }
  875. }
  876. }
  877. }
  878. },
  879. "/pic/upload": {
  880. "post": {
  881. "consumes": [
  882. "multipart/form-data"
  883. ],
  884. "produces": [
  885. "application/json"
  886. ],
  887. "tags": [
  888. "图片模块"
  889. ],
  890. "summary": "上传图片",
  891. "parameters": [
  892. {
  893. "type": "file",
  894. "description": "图片",
  895. "name": "pic",
  896. "in": "formData",
  897. "required": true
  898. }
  899. ],
  900. "responses": {
  901. "200": {
  902. "description": "OK",
  903. "schema": {
  904. "$ref": "#/definitions/response.Response"
  905. }
  906. }
  907. }
  908. }
  909. },
  910. "/pic/{page}/{pageSize}": {
  911. "get": {
  912. "produces": [
  913. "application/json"
  914. ],
  915. "tags": [
  916. "图片模块"
  917. ],
  918. "summary": "分页获取图片",
  919. "parameters": [
  920. {
  921. "type": "integer",
  922. "description": "页数",
  923. "name": "page",
  924. "in": "path",
  925. "required": true
  926. },
  927. {
  928. "type": "integer",
  929. "description": "一页的大小",
  930. "name": "pageSize",
  931. "in": "path",
  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/bad": {
  946. "get": {
  947. "produces": [
  948. "application/json"
  949. ],
  950. "tags": [
  951. "用户关系模块"
  952. ],
  953. "summary": "传入用户id获取用户黑名单列表",
  954. "parameters": [
  955. {
  956. "type": "integer",
  957. "description": "用户id",
  958. "name": "uid",
  959. "in": "query",
  960. "required": true
  961. }
  962. ],
  963. "responses": {
  964. "200": {
  965. "description": "OK",
  966. "schema": {
  967. "$ref": "#/definitions/response.Response"
  968. }
  969. }
  970. }
  971. }
  972. },
  973. "/relation/create": {
  974. "post": {
  975. "consumes": [
  976. "application/json"
  977. ],
  978. "produces": [
  979. "application/json"
  980. ],
  981. "tags": [
  982. "用户关系模块"
  983. ],
  984. "summary": "添加用户间的关系,关系类型有1:好友关系,2:黑名单关系",
  985. "parameters": [
  986. {
  987. "description": "关系数据",
  988. "name": "json",
  989. "in": "body",
  990. "required": true,
  991. "schema": {
  992. "$ref": "#/definitions/model.RelationJson"
  993. }
  994. }
  995. ],
  996. "responses": {
  997. "200": {
  998. "description": "OK",
  999. "schema": {
  1000. "$ref": "#/definitions/response.Response"
  1001. }
  1002. }
  1003. }
  1004. }
  1005. },
  1006. "/relation/delete/{id}": {
  1007. "delete": {
  1008. "produces": [
  1009. "application/json"
  1010. ],
  1011. "tags": [
  1012. "用户关系模块"
  1013. ],
  1014. "summary": "根据关系id删除关系",
  1015. "parameters": [
  1016. {
  1017. "type": "integer",
  1018. "description": "关系id",
  1019. "name": "id",
  1020. "in": "path",
  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/friend": {
  1035. "get": {
  1036. "produces": [
  1037. "application/json"
  1038. ],
  1039. "tags": [
  1040. "用户关系模块"
  1041. ],
  1042. "summary": "传入用户id获取用户好友列表",
  1043. "parameters": [
  1044. {
  1045. "type": "integer",
  1046. "description": "用户id",
  1047. "name": "uid",
  1048. "in": "query",
  1049. "required": true
  1050. }
  1051. ],
  1052. "responses": {
  1053. "200": {
  1054. "description": "OK",
  1055. "schema": {
  1056. "$ref": "#/definitions/response.Response"
  1057. }
  1058. }
  1059. }
  1060. }
  1061. },
  1062. "/relation/{page}/{pageSize}": {
  1063. "get": {
  1064. "produces": [
  1065. "application/json"
  1066. ],
  1067. "tags": [
  1068. "用户关系模块"
  1069. ],
  1070. "summary": "分页用户关系",
  1071. "parameters": [
  1072. {
  1073. "type": "integer",
  1074. "description": "页数",
  1075. "name": "page",
  1076. "in": "path",
  1077. "required": true
  1078. },
  1079. {
  1080. "type": "integer",
  1081. "description": "一页的大小",
  1082. "name": "pageSize",
  1083. "in": "path",
  1084. "required": true
  1085. }
  1086. ],
  1087. "responses": {
  1088. "200": {
  1089. "description": "OK",
  1090. "schema": {
  1091. "$ref": "#/definitions/response.Response"
  1092. }
  1093. }
  1094. }
  1095. }
  1096. },
  1097. "/user/info": {
  1098. "get": {
  1099. "produces": [
  1100. "application/json"
  1101. ],
  1102. "tags": [
  1103. "用户模块"
  1104. ],
  1105. "summary": "获取用户信息",
  1106. "responses": {
  1107. "200": {
  1108. "description": "OK",
  1109. "schema": {
  1110. "$ref": "#/definitions/response.Response"
  1111. }
  1112. }
  1113. }
  1114. }
  1115. },
  1116. "/user/login": {
  1117. "post": {
  1118. "produces": [
  1119. "application/json"
  1120. ],
  1121. "tags": [
  1122. "用户模块"
  1123. ],
  1124. "summary": "登录",
  1125. "parameters": [
  1126. {
  1127. "type": "string",
  1128. "description": "微信ID",
  1129. "name": "vid",
  1130. "in": "formData"
  1131. }
  1132. ],
  1133. "responses": {
  1134. "200": {
  1135. "description": "OK",
  1136. "schema": {
  1137. "$ref": "#/definitions/response.Response"
  1138. }
  1139. }
  1140. }
  1141. }
  1142. },
  1143. "/user/modify": {
  1144. "post": {
  1145. "consumes": [
  1146. "application/json"
  1147. ],
  1148. "produces": [
  1149. "application/json"
  1150. ],
  1151. "tags": [
  1152. "用户模块"
  1153. ],
  1154. "summary": "修改用户信息",
  1155. "parameters": [
  1156. {
  1157. "description": "用户信息",
  1158. "name": "json",
  1159. "in": "body",
  1160. "required": true,
  1161. "schema": {
  1162. "$ref": "#/definitions/model.User"
  1163. }
  1164. }
  1165. ],
  1166. "responses": {
  1167. "200": {
  1168. "description": "OK",
  1169. "schema": {
  1170. "$ref": "#/definitions/response.Response"
  1171. }
  1172. }
  1173. }
  1174. }
  1175. },
  1176. "/user/register": {
  1177. "post": {
  1178. "consumes": [
  1179. "application/json"
  1180. ],
  1181. "produces": [
  1182. "application/json"
  1183. ],
  1184. "tags": [
  1185. "用户模块"
  1186. ],
  1187. "summary": "创建用户",
  1188. "parameters": [
  1189. {
  1190. "description": "用户信息",
  1191. "name": "json",
  1192. "in": "body",
  1193. "required": true,
  1194. "schema": {
  1195. "$ref": "#/definitions/model.UserJson"
  1196. }
  1197. }
  1198. ],
  1199. "responses": {
  1200. "200": {
  1201. "description": "OK",
  1202. "schema": {
  1203. "$ref": "#/definitions/response.Response"
  1204. }
  1205. }
  1206. }
  1207. }
  1208. },
  1209. "/user/{page}/{pageSize}": {
  1210. "get": {
  1211. "produces": [
  1212. "application/json"
  1213. ],
  1214. "tags": [
  1215. "用户模块"
  1216. ],
  1217. "summary": "分页用户信息",
  1218. "parameters": [
  1219. {
  1220. "type": "integer",
  1221. "description": "页数",
  1222. "name": "page",
  1223. "in": "path",
  1224. "required": true
  1225. },
  1226. {
  1227. "type": "integer",
  1228. "description": "一页的大小",
  1229. "name": "pageSize",
  1230. "in": "path",
  1231. "required": true
  1232. }
  1233. ],
  1234. "responses": {
  1235. "200": {
  1236. "description": "OK",
  1237. "schema": {
  1238. "$ref": "#/definitions/response.Response"
  1239. }
  1240. }
  1241. }
  1242. }
  1243. }
  1244. },
  1245. "definitions": {
  1246. "model.Appraise": {
  1247. "type": "object",
  1248. "properties": {
  1249. "buyerId": {
  1250. "type": "integer"
  1251. },
  1252. "content": {
  1253. "type": "string"
  1254. },
  1255. "goodsId": {
  1256. "type": "integer"
  1257. },
  1258. "id": {
  1259. "type": "integer"
  1260. },
  1261. "star": {
  1262. "type": "integer"
  1263. },
  1264. "time": {
  1265. "type": "integer"
  1266. }
  1267. }
  1268. },
  1269. "model.AppraiseJson": {
  1270. "type": "object",
  1271. "properties": {
  1272. "buyerId": {
  1273. "type": "integer"
  1274. },
  1275. "content": {
  1276. "type": "string"
  1277. },
  1278. "goodsId": {
  1279. "type": "integer"
  1280. },
  1281. "star": {
  1282. "type": "integer"
  1283. },
  1284. "time": {
  1285. "type": "integer"
  1286. }
  1287. }
  1288. },
  1289. "model.CategoryJson": {
  1290. "type": "object",
  1291. "properties": {
  1292. "name": {
  1293. "type": "string"
  1294. },
  1295. "pic": {
  1296. "type": "string"
  1297. }
  1298. }
  1299. },
  1300. "model.Goods": {
  1301. "type": "object",
  1302. "properties": {
  1303. "desc": {
  1304. "type": "string"
  1305. },
  1306. "id": {
  1307. "type": "integer"
  1308. },
  1309. "integrity": {
  1310. "type": "integer"
  1311. },
  1312. "ownerId": {
  1313. "type": "integer"
  1314. },
  1315. "picId": {
  1316. "type": "integer"
  1317. },
  1318. "place": {
  1319. "type": "string"
  1320. },
  1321. "price": {
  1322. "type": "integer"
  1323. },
  1324. "state": {
  1325. "type": "integer"
  1326. },
  1327. "title": {
  1328. "type": "string"
  1329. }
  1330. }
  1331. },
  1332. "model.GoodsJson": {
  1333. "type": "object",
  1334. "properties": {
  1335. "categories": {
  1336. "type": "array",
  1337. "items": {
  1338. "type": "integer"
  1339. }
  1340. },
  1341. "desc": {
  1342. "type": "string"
  1343. },
  1344. "integrity": {
  1345. "type": "integer"
  1346. },
  1347. "ownerId": {
  1348. "type": "integer"
  1349. },
  1350. "pic_id": {
  1351. "type": "integer"
  1352. },
  1353. "place": {
  1354. "type": "string"
  1355. },
  1356. "price": {
  1357. "type": "integer"
  1358. },
  1359. "state": {
  1360. "type": "integer"
  1361. },
  1362. "title": {
  1363. "type": "string"
  1364. }
  1365. }
  1366. },
  1367. "model.OrderJson": {
  1368. "type": "object",
  1369. "properties": {
  1370. "buyerId": {
  1371. "type": "integer"
  1372. },
  1373. "goodsId": {
  1374. "type": "integer"
  1375. },
  1376. "phone": {
  1377. "type": "string"
  1378. },
  1379. "place": {
  1380. "type": "string"
  1381. },
  1382. "state": {
  1383. "type": "integer"
  1384. },
  1385. "time": {
  1386. "type": "integer"
  1387. }
  1388. }
  1389. },
  1390. "model.RelationJson": {
  1391. "type": "object",
  1392. "properties": {
  1393. "owner": {
  1394. "type": "integer"
  1395. },
  1396. "target": {
  1397. "type": "integer"
  1398. },
  1399. "type": {
  1400. "type": "integer"
  1401. }
  1402. }
  1403. },
  1404. "model.User": {
  1405. "type": "object",
  1406. "properties": {
  1407. "avatar": {
  1408. "type": "string"
  1409. },
  1410. "name": {
  1411. "type": "string"
  1412. },
  1413. "phone": {
  1414. "type": "string"
  1415. },
  1416. "uid": {
  1417. "type": "integer"
  1418. },
  1419. "vid": {
  1420. "type": "string"
  1421. }
  1422. }
  1423. },
  1424. "model.UserJson": {
  1425. "type": "object",
  1426. "properties": {
  1427. "avatar": {
  1428. "type": "string"
  1429. },
  1430. "name": {
  1431. "type": "string"
  1432. },
  1433. "phone": {
  1434. "type": "string"
  1435. },
  1436. "vid": {
  1437. "type": "string"
  1438. }
  1439. }
  1440. },
  1441. "response.Response": {
  1442. "type": "object",
  1443. "properties": {
  1444. "code": {
  1445. "type": "integer"
  1446. },
  1447. "data": {},
  1448. "message": {
  1449. "type": "string"
  1450. }
  1451. }
  1452. }
  1453. }
  1454. }`
  1455. // SwaggerInfo holds exported Swagger Info so clients can modify it
  1456. var SwaggerInfo = &swag.Spec{
  1457. Version: "1.0",
  1458. Host: "192.168.31.28:8084",
  1459. BasePath: "/WeChatTrading/trading-go",
  1460. Schemes: []string{},
  1461. Title: "二手交易",
  1462. Description: "一个基于微信小程序的校园二手交易平台的api文档",
  1463. InfoInstanceName: "swagger",
  1464. SwaggerTemplate: docTemplate,
  1465. LeftDelim: "{{",
  1466. RightDelim: "}}",
  1467. }
  1468. func init() {
  1469. swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
  1470. }