docs.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  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/QueryCPTradeUserGoodsData": {
  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": "accountid",
  44. "in": "query",
  45. "required": true
  46. }
  47. ],
  48. "responses": {
  49. "200": {
  50. "description": "OK",
  51. "schema": {
  52. "$ref": "#/definitions/cptrade.Cptradeusergoodsdata"
  53. }
  54. },
  55. "500": {
  56. "description": "Internal Server Error",
  57. "schema": {
  58. "$ref": "#/definitions/app.Response"
  59. }
  60. }
  61. }
  62. }
  63. },
  64. "/CPTrade/QueryPreasleApply": {
  65. "get": {
  66. "security": [
  67. {
  68. "ApiKeyAuth": []
  69. }
  70. ],
  71. "produces": [
  72. "application/json"
  73. ],
  74. "tags": [
  75. "产能预售"
  76. ],
  77. "summary": "查询产能预售申请表信息",
  78. "parameters": [
  79. {
  80. "type": "integer",
  81. "description": "账户ID",
  82. "name": "userid",
  83. "in": "query",
  84. "required": true
  85. },
  86. {
  87. "type": "integer",
  88. "description": "申请ID",
  89. "name": "applyid",
  90. "in": "query"
  91. },
  92. {
  93. "type": "integer",
  94. "description": "资金账户ID",
  95. "name": "accountid",
  96. "in": "query"
  97. }
  98. ],
  99. "responses": {
  100. "200": {
  101. "description": "OK",
  102. "schema": {
  103. "$ref": "#/definitions/cptrade.Cptradepresaleapply"
  104. }
  105. },
  106. "500": {
  107. "description": "Internal Server Error",
  108. "schema": {
  109. "$ref": "#/definitions/app.Response"
  110. }
  111. }
  112. }
  113. }
  114. },
  115. "/WRTrade/GetAllDeliveryGoods": {
  116. "get": {
  117. "security": [
  118. {
  119. "ApiKeyAuth": []
  120. }
  121. ],
  122. "produces": [
  123. "application/json"
  124. ],
  125. "tags": [
  126. "仓单贸易"
  127. ],
  128. "summary": "获取带仓单分类的种类信息",
  129. "responses": {
  130. "200": {
  131. "description": "OK",
  132. "schema": {
  133. "$ref": "#/definitions/app.Response"
  134. }
  135. },
  136. "500": {
  137. "description": "Internal Server Error",
  138. "schema": {
  139. "$ref": "#/definitions/app.Response"
  140. }
  141. }
  142. }
  143. }
  144. }
  145. },
  146. "definitions": {
  147. "app.Response": {
  148. "type": "object",
  149. "properties": {
  150. "code": {
  151. "type": "integer"
  152. },
  153. "data": {
  154. "type": "object"
  155. },
  156. "msg": {
  157. "type": "string"
  158. }
  159. }
  160. },
  161. "cptrade.Cptradepresaleapply": {
  162. "type": "object",
  163. "required": [
  164. "applyid"
  165. ],
  166. "properties": {
  167. "accountid": {
  168. "description": "申请人账户ID",
  169. "type": "integer"
  170. },
  171. "applyid": {
  172. "description": "申请ID(181+Unix秒时间戳(10位)+xxxxxx)",
  173. "type": "integer"
  174. },
  175. "applystatus": {
  176. "description": "申请状态 - 1:已提交 2:初审通过 3:初审拒绝 4:初审失败 5复审通过 6:复审拒绝 7:复审失败 8:已撤销",
  177. "type": "integer"
  178. },
  179. "applytime": {
  180. "description": "申请时间",
  181. "type": "string"
  182. },
  183. "attachmenturl": {
  184. "description": "附件地址",
  185. "type": "string"
  186. },
  187. "endtime": {
  188. "description": "预售结束时间",
  189. "type": "string"
  190. },
  191. "firstremark": {
  192. "description": "初审备注",
  193. "type": "string"
  194. },
  195. "goodscode": {
  196. "description": "商品代码",
  197. "type": "string"
  198. },
  199. "goodsname": {
  200. "description": "商品名称",
  201. "type": "string"
  202. },
  203. "handlestatus": {
  204. "description": "处理状态",
  205. "type": "integer"
  206. },
  207. "marketid": {
  208. "description": "预售市场ID",
  209. "type": "integer"
  210. },
  211. "presaleqty": {
  212. "description": "预售数量",
  213. "type": "integer"
  214. },
  215. "relatedgoodsid": {
  216. "description": "关联交易合约ID",
  217. "type": "integer"
  218. },
  219. "secondremark": {
  220. "description": "复审备注",
  221. "type": "string"
  222. },
  223. "starttime": {
  224. "description": "预售开始时间",
  225. "type": "string"
  226. },
  227. "tradedate": {
  228. "description": "交易日(yyyyMMdd)",
  229. "type": "string"
  230. },
  231. "userid": {
  232. "description": "申请人ID",
  233. "type": "integer"
  234. }
  235. }
  236. },
  237. "cptrade.Cptradeusergoodsdata": {
  238. "type": "object",
  239. "required": [
  240. "accountid",
  241. "goodsid"
  242. ],
  243. "properties": {
  244. "EnabledQty": {
  245. "description": "可用量",
  246. "type": "integer"
  247. },
  248. "GoodsCode": {
  249. "description": "订单商品代码",
  250. "type": "string"
  251. },
  252. "GoodsName": {
  253. "description": "订单商品名称",
  254. "type": "string"
  255. },
  256. "WRStandardCode": {
  257. "description": "仓单标准代码",
  258. "type": "string"
  259. },
  260. "WRStandardName": {
  261. "description": "仓单标准名称",
  262. "type": "string"
  263. },
  264. "accountid": {
  265. "description": "账户ID",
  266. "type": "integer"
  267. },
  268. "cancelqty": {
  269. "description": "注销量",
  270. "type": "integer"
  271. },
  272. "curpresaleqty": {
  273. "description": "当前预售量",
  274. "type": "integer"
  275. },
  276. "deliveryqty": {
  277. "description": "交割量",
  278. "type": "integer"
  279. },
  280. "freezeamount": {
  281. "description": "冻结金额",
  282. "type": "number"
  283. },
  284. "goodsid": {
  285. "description": "商品ID",
  286. "type": "integer"
  287. },
  288. "hasspotfreeze": {
  289. "description": "是否有现货冻结 - 0:否 1:有",
  290. "type": "integer"
  291. },
  292. "inqty": {
  293. "description": "转入量",
  294. "type": "integer"
  295. },
  296. "marketid": {
  297. "description": "市场ID",
  298. "type": "integer"
  299. },
  300. "presaledamount": {
  301. "description": "已预售总金额",
  302. "type": "integer"
  303. },
  304. "presaledqty": {
  305. "description": "已预售量",
  306. "type": "integer"
  307. },
  308. "userid": {
  309. "description": "用户ID",
  310. "type": "integer"
  311. },
  312. "wrstandardid": {
  313. "description": "仓单标准ID",
  314. "type": "integer"
  315. }
  316. }
  317. }
  318. },
  319. "securityDefinitions": {
  320. "ApiKeyAuth": {
  321. "type": "apiKey",
  322. "name": "token",
  323. "in": "header"
  324. }
  325. }
  326. }`
  327. type swaggerInfo struct {
  328. Version string
  329. Host string
  330. BasePath string
  331. Schemes []string
  332. Title string
  333. Description string
  334. }
  335. // SwaggerInfo holds exported Swagger Info so clients can modify it
  336. var SwaggerInfo = swaggerInfo{
  337. Version: "1.0",
  338. Host: "",
  339. BasePath: "/api",
  340. Schemes: []string{},
  341. Title: "MTP2.0 查询服务 API",
  342. Description: "新的查询服务,替代原通用查询服务。",
  343. }
  344. type s struct{}
  345. func (s *s) ReadDoc() string {
  346. sInfo := SwaggerInfo
  347. sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
  348. t, err := template.New("swagger_info").Funcs(template.FuncMap{
  349. "marshal": func(v interface{}) string {
  350. a, _ := json.Marshal(v)
  351. return string(a)
  352. },
  353. }).Parse(doc)
  354. if err != nil {
  355. return doc
  356. }
  357. var tpl bytes.Buffer
  358. if err := t.Execute(&tpl, sInfo); err != nil {
  359. return doc
  360. }
  361. return tpl.String()
  362. }
  363. func init() {
  364. swag.Register(swag.Name, &s{})
  365. }