docs.go 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. // GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
  2. // This file was generated by swaggo/swag
  3. package docs
  4. import (
  5. "bytes"
  6. "encoding/json"
  7. "strings"
  8. "github.com/alecthomas/template"
  9. "github.com/swaggo/swag"
  10. )
  11. var doc = `{
  12. "schemes": {{ marshal .Schemes }},
  13. "swagger": "2.0",
  14. "info": {
  15. "description": "{{.Description}}",
  16. "title": "{{.Title}}",
  17. "termsOfService": "http://muchinfo.cn",
  18. "contact": {},
  19. "license": {},
  20. "version": "{{.Version}}"
  21. },
  22. "host": "{{.Host}}",
  23. "basePath": "{{.BasePath}}",
  24. "paths": {
  25. "/CPTrade/QueryPreasleApply": {
  26. "get": {
  27. "security": [
  28. {
  29. "ApiKeyAuth": []
  30. }
  31. ],
  32. "produces": [
  33. "application/json"
  34. ],
  35. "tags": [
  36. "产能预售"
  37. ],
  38. "summary": "查询产能预售申请表信息",
  39. "parameters": [
  40. {
  41. "type": "integer",
  42. "description": "账户ID",
  43. "name": "userid",
  44. "in": "query",
  45. "required": true
  46. },
  47. {
  48. "type": "integer",
  49. "description": "申请ID",
  50. "name": "applyid",
  51. "in": "query"
  52. },
  53. {
  54. "type": "integer",
  55. "description": "资金账户ID",
  56. "name": "accountid",
  57. "in": "query"
  58. }
  59. ],
  60. "responses": {
  61. "200": {
  62. "description": "OK",
  63. "schema": {
  64. "$ref": "#/definitions/cptrade.Cptradepresaleapply"
  65. }
  66. },
  67. "500": {
  68. "description": "Internal Server Error",
  69. "schema": {
  70. "$ref": "#/definitions/app.Response"
  71. }
  72. }
  73. }
  74. }
  75. },
  76. "/WRTrade/GetAllDeliveryGoods": {
  77. "get": {
  78. "security": [
  79. {
  80. "ApiKeyAuth": []
  81. }
  82. ],
  83. "produces": [
  84. "application/json"
  85. ],
  86. "tags": [
  87. "仓单贸易"
  88. ],
  89. "summary": "获取带仓单分类的种类信息",
  90. "responses": {
  91. "200": {
  92. "description": "OK",
  93. "schema": {
  94. "$ref": "#/definitions/app.Response"
  95. }
  96. },
  97. "500": {
  98. "description": "Internal Server Error",
  99. "schema": {
  100. "$ref": "#/definitions/app.Response"
  101. }
  102. }
  103. }
  104. }
  105. }
  106. },
  107. "definitions": {
  108. "app.Response": {
  109. "type": "object",
  110. "properties": {
  111. "code": {
  112. "type": "integer"
  113. },
  114. "data": {
  115. "type": "object"
  116. },
  117. "msg": {
  118. "type": "string"
  119. }
  120. }
  121. },
  122. "cptrade.Cptradepresaleapply": {
  123. "type": "object",
  124. "required": [
  125. "applyid"
  126. ],
  127. "properties": {
  128. "accountid": {
  129. "description": "申请人账户ID",
  130. "type": "integer"
  131. },
  132. "applyid": {
  133. "description": "申请ID(181+Unix秒时间戳(10位)+xxxxxx)",
  134. "type": "integer"
  135. },
  136. "applystatus": {
  137. "description": "申请状态 - 1:已提交 2:初审通过 3:初审拒绝 4:初审失败 5复审通过 6:复审拒绝 7:复审失败 8:已撤销",
  138. "type": "integer"
  139. },
  140. "applytime": {
  141. "description": "申请时间",
  142. "type": "string"
  143. },
  144. "attachmenturl": {
  145. "description": "附件地址",
  146. "type": "string"
  147. },
  148. "endtime": {
  149. "description": "预售结束时间",
  150. "type": "string"
  151. },
  152. "firstremark": {
  153. "description": "初审备注",
  154. "type": "string"
  155. },
  156. "goodscode": {
  157. "description": "商品代码",
  158. "type": "string"
  159. },
  160. "goodsname": {
  161. "description": "商品名称",
  162. "type": "string"
  163. },
  164. "handlestatus": {
  165. "description": "处理状态",
  166. "type": "integer"
  167. },
  168. "marketid": {
  169. "description": "预售市场ID",
  170. "type": "integer"
  171. },
  172. "presaleqty": {
  173. "description": "预售数量",
  174. "type": "integer"
  175. },
  176. "relatedgoodsid": {
  177. "description": "关联交易合约ID",
  178. "type": "integer"
  179. },
  180. "secondremark": {
  181. "description": "复审备注",
  182. "type": "string"
  183. },
  184. "starttime": {
  185. "description": "预售开始时间",
  186. "type": "string"
  187. },
  188. "tradedate": {
  189. "description": "交易日(yyyyMMdd)",
  190. "type": "string"
  191. },
  192. "userid": {
  193. "description": "申请人ID",
  194. "type": "integer"
  195. }
  196. }
  197. }
  198. },
  199. "securityDefinitions": {
  200. "ApiKeyAuth": {
  201. "type": "apiKey",
  202. "name": "token",
  203. "in": "header"
  204. }
  205. }
  206. }`
  207. type swaggerInfo struct {
  208. Version string
  209. Host string
  210. BasePath string
  211. Schemes []string
  212. Title string
  213. Description string
  214. }
  215. // SwaggerInfo holds exported Swagger Info so clients can modify it
  216. var SwaggerInfo = swaggerInfo{
  217. Version: "1.0",
  218. Host: "",
  219. BasePath: "/api",
  220. Schemes: []string{},
  221. Title: "MTP2.0 查询服务 API",
  222. Description: "新的查询服务,替代原通用查询服务。",
  223. }
  224. type s struct{}
  225. func (s *s) ReadDoc() string {
  226. sInfo := SwaggerInfo
  227. sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
  228. t, err := template.New("swagger_info").Funcs(template.FuncMap{
  229. "marshal": func(v interface{}) string {
  230. a, _ := json.Marshal(v)
  231. return string(a)
  232. },
  233. }).Parse(doc)
  234. if err != nil {
  235. return doc
  236. }
  237. var tpl bytes.Buffer
  238. if err := t.Execute(&tpl, sInfo); err != nil {
  239. return doc
  240. }
  241. return tpl.String()
  242. }
  243. func init() {
  244. swag.Register(swag.Name, &s{})
  245. }