docs.go 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516
  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/QueryCPTradePositionCancel": {
  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": "cancelid",
  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.Cptradepositioncancel"
  65. }
  66. },
  67. "500": {
  68. "description": "Internal Server Error",
  69. "schema": {
  70. "$ref": "#/definitions/app.Response"
  71. }
  72. }
  73. }
  74. }
  75. },
  76. "/CPTrade/QueryCPTradeUserGoodsData": {
  77. "get": {
  78. "security": [
  79. {
  80. "ApiKeyAuth": []
  81. }
  82. ],
  83. "produces": [
  84. "application/json"
  85. ],
  86. "tags": [
  87. "产能预售"
  88. ],
  89. "summary": "查询远期订单信息",
  90. "parameters": [
  91. {
  92. "type": "integer",
  93. "description": "资金账户ID",
  94. "name": "accountid",
  95. "in": "query",
  96. "required": true
  97. }
  98. ],
  99. "responses": {
  100. "200": {
  101. "description": "OK",
  102. "schema": {
  103. "$ref": "#/definitions/cptrade.Cptradeusergoodsdata"
  104. }
  105. },
  106. "500": {
  107. "description": "Internal Server Error",
  108. "schema": {
  109. "$ref": "#/definitions/app.Response"
  110. }
  111. }
  112. }
  113. }
  114. },
  115. "/CPTrade/QueryPreasleApply": {
  116. "get": {
  117. "security": [
  118. {
  119. "ApiKeyAuth": []
  120. }
  121. ],
  122. "produces": [
  123. "application/json"
  124. ],
  125. "tags": [
  126. "产能预售"
  127. ],
  128. "summary": "查询产能预售申请信息",
  129. "parameters": [
  130. {
  131. "type": "integer",
  132. "description": "账户ID",
  133. "name": "userid",
  134. "in": "query",
  135. "required": true
  136. },
  137. {
  138. "type": "integer",
  139. "description": "申请ID",
  140. "name": "applyid",
  141. "in": "query"
  142. },
  143. {
  144. "type": "integer",
  145. "description": "资金账户ID",
  146. "name": "accountid",
  147. "in": "query"
  148. }
  149. ],
  150. "responses": {
  151. "200": {
  152. "description": "OK",
  153. "schema": {
  154. "$ref": "#/definitions/cptrade.Cptradepresaleapply"
  155. }
  156. },
  157. "500": {
  158. "description": "Internal Server Error",
  159. "schema": {
  160. "$ref": "#/definitions/app.Response"
  161. }
  162. }
  163. }
  164. }
  165. },
  166. "/WRTrade/GetAllDeliveryGoods": {
  167. "get": {
  168. "security": [
  169. {
  170. "ApiKeyAuth": []
  171. }
  172. ],
  173. "produces": [
  174. "application/json"
  175. ],
  176. "tags": [
  177. "仓单贸易"
  178. ],
  179. "summary": "获取带仓单分类的种类信息",
  180. "responses": {
  181. "200": {
  182. "description": "OK",
  183. "schema": {
  184. "$ref": "#/definitions/app.Response"
  185. }
  186. },
  187. "500": {
  188. "description": "Internal Server Error",
  189. "schema": {
  190. "$ref": "#/definitions/app.Response"
  191. }
  192. }
  193. }
  194. }
  195. }
  196. },
  197. "definitions": {
  198. "app.Response": {
  199. "type": "object",
  200. "properties": {
  201. "code": {
  202. "type": "integer"
  203. },
  204. "data": {
  205. "type": "object"
  206. },
  207. "msg": {
  208. "type": "string"
  209. }
  210. }
  211. },
  212. "cptrade.Cptradepositioncancel": {
  213. "type": "object",
  214. "required": [
  215. "cancelid"
  216. ],
  217. "properties": {
  218. "accountid": {
  219. "description": "申请人账户ID",
  220. "type": "integer"
  221. },
  222. "applystatus": {
  223. "description": "申请状态 - 1:已提交 2:初审通过 3:初审拒绝 4:初审失败 5复审通过 6:复审拒绝 7:复审失败 8:已撤销",
  224. "type": "integer"
  225. },
  226. "applytime": {
  227. "description": "申请时间",
  228. "type": "string"
  229. },
  230. "cancelid": {
  231. "description": "注销ID(SEQ_CPTRADE_POSITIONCANCEL)",
  232. "type": "integer"
  233. },
  234. "cancelqty": {
  235. "description": "注销数量",
  236. "type": "integer"
  237. },
  238. "createtime": {
  239. "description": "创建时间",
  240. "type": "string"
  241. },
  242. "creatorid": {
  243. "description": "创建人",
  244. "type": "integer"
  245. },
  246. "goodscode": {
  247. "description": "订单商品代码",
  248. "type": "string"
  249. },
  250. "goodsid": {
  251. "description": "商品ID",
  252. "type": "integer"
  253. },
  254. "goodsname": {
  255. "description": "订单商品名称",
  256. "type": "string"
  257. },
  258. "goodunit": {
  259. "description": "报价单位",
  260. "type": "string"
  261. },
  262. "handlestatus": {
  263. "description": "处理状态",
  264. "type": "integer"
  265. },
  266. "marketid": {
  267. "description": "市场ID",
  268. "type": "integer"
  269. },
  270. "marketname": {
  271. "description": "市场名称",
  272. "type": "string"
  273. },
  274. "tradedate": {
  275. "description": "交易日(yyyyMMdd)",
  276. "type": "string"
  277. },
  278. "userid": {
  279. "description": "申请人ID",
  280. "type": "integer"
  281. }
  282. }
  283. },
  284. "cptrade.Cptradepresaleapply": {
  285. "type": "object",
  286. "required": [
  287. "applyid"
  288. ],
  289. "properties": {
  290. "accountid": {
  291. "description": "申请人账户ID",
  292. "type": "integer"
  293. },
  294. "applyid": {
  295. "description": "申请ID(181+Unix秒时间戳(10位)+xxxxxx)",
  296. "type": "integer"
  297. },
  298. "applystatus": {
  299. "description": "申请状态 - 1:已提交 2:初审通过 3:初审拒绝 4:初审失败 5复审通过 6:复审拒绝 7:复审失败 8:已撤销",
  300. "type": "integer"
  301. },
  302. "applytime": {
  303. "description": "申请时间",
  304. "type": "string"
  305. },
  306. "attachmenturl": {
  307. "description": "附件地址",
  308. "type": "string"
  309. },
  310. "endtime": {
  311. "description": "预售结束时间",
  312. "type": "string"
  313. },
  314. "goodscode": {
  315. "description": "商品代码",
  316. "type": "string"
  317. },
  318. "goodsname": {
  319. "description": "商品名称",
  320. "type": "string"
  321. },
  322. "goodunit": {
  323. "description": "报价单位",
  324. "type": "string"
  325. },
  326. "handlestatus": {
  327. "description": "处理状态",
  328. "type": "integer"
  329. },
  330. "marketid": {
  331. "description": "预售市场ID",
  332. "type": "integer"
  333. },
  334. "marketname": {
  335. "description": "预售市场名称",
  336. "type": "string"
  337. },
  338. "presaleqty": {
  339. "description": "预售数量",
  340. "type": "integer"
  341. },
  342. "relatedgoodscode": {
  343. "description": "关联交易合约代码",
  344. "type": "string"
  345. },
  346. "relatedgoodsid": {
  347. "description": "关联交易合约ID",
  348. "type": "integer"
  349. },
  350. "relatedgoodsname": {
  351. "description": "关联交易合约名称",
  352. "type": "string"
  353. },
  354. "starttime": {
  355. "description": "预售开始时间",
  356. "type": "string"
  357. },
  358. "tradedate": {
  359. "description": "交易日(yyyyMMdd)",
  360. "type": "string"
  361. },
  362. "trademode": {
  363. "description": "交易模式 - 16:挂牌点选 21:大宗竞拍",
  364. "type": "integer"
  365. },
  366. "userid": {
  367. "description": "申请人ID",
  368. "type": "integer"
  369. }
  370. }
  371. },
  372. "cptrade.Cptradeusergoodsdata": {
  373. "type": "object",
  374. "required": [
  375. "accountid",
  376. "goodsid"
  377. ],
  378. "properties": {
  379. "EnabledQty": {
  380. "description": "可用量",
  381. "type": "integer"
  382. },
  383. "GoodsCode": {
  384. "description": "订单商品代码",
  385. "type": "string"
  386. },
  387. "GoodsName": {
  388. "description": "订单商品名称",
  389. "type": "string"
  390. },
  391. "WRStandardCode": {
  392. "description": "仓单标准代码",
  393. "type": "string"
  394. },
  395. "WRStandardName": {
  396. "description": "仓单标准名称",
  397. "type": "string"
  398. },
  399. "accountid": {
  400. "description": "账户ID",
  401. "type": "integer"
  402. },
  403. "cancelqty": {
  404. "description": "注销量",
  405. "type": "integer"
  406. },
  407. "curpresaleqty": {
  408. "description": "当前预售量",
  409. "type": "integer"
  410. },
  411. "deliveryqty": {
  412. "description": "交割量",
  413. "type": "integer"
  414. },
  415. "freezeamount": {
  416. "description": "冻结金额",
  417. "type": "number"
  418. },
  419. "goodsid": {
  420. "description": "商品ID",
  421. "type": "integer"
  422. },
  423. "goodunit": {
  424. "description": "报价单位",
  425. "type": "string"
  426. },
  427. "hasspotfreeze": {
  428. "description": "是否有现货冻结 - 0:否 1:有",
  429. "type": "integer"
  430. },
  431. "inqty": {
  432. "description": "转入量",
  433. "type": "integer"
  434. },
  435. "marketid": {
  436. "description": "市场ID",
  437. "type": "integer"
  438. },
  439. "presaledamount": {
  440. "description": "已预售总金额",
  441. "type": "integer"
  442. },
  443. "presaledqty": {
  444. "description": "已预售量",
  445. "type": "integer"
  446. },
  447. "userid": {
  448. "description": "用户ID",
  449. "type": "integer"
  450. },
  451. "wrstandardid": {
  452. "description": "仓单标准ID",
  453. "type": "integer"
  454. }
  455. }
  456. }
  457. },
  458. "securityDefinitions": {
  459. "ApiKeyAuth": {
  460. "type": "apiKey",
  461. "name": "token",
  462. "in": "header"
  463. }
  464. }
  465. }`
  466. type swaggerInfo struct {
  467. Version string
  468. Host string
  469. BasePath string
  470. Schemes []string
  471. Title string
  472. Description string
  473. }
  474. // SwaggerInfo holds exported Swagger Info so clients can modify it
  475. var SwaggerInfo = swaggerInfo{
  476. Version: "1.0",
  477. Host: "",
  478. BasePath: "/api",
  479. Schemes: []string{},
  480. Title: "MTP2.0 查询服务 API",
  481. Description: "新的查询服务,替代原通用查询服务。",
  482. }
  483. type s struct{}
  484. func (s *s) ReadDoc() string {
  485. sInfo := SwaggerInfo
  486. sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
  487. t, err := template.New("swagger_info").Funcs(template.FuncMap{
  488. "marshal": func(v interface{}) string {
  489. a, _ := json.Marshal(v)
  490. return string(a)
  491. },
  492. }).Parse(doc)
  493. if err != nil {
  494. return doc
  495. }
  496. var tpl bytes.Buffer
  497. if err := t.Execute(&tpl, sInfo); err != nil {
  498. return doc
  499. }
  500. return tpl.String()
  501. }
  502. func init() {
  503. swag.Register(swag.Name, &s{})
  504. }