docs.go 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642
  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. "/CPTrade/QueryPresaleGoodsEx": {
  167. "get": {
  168. "security": [
  169. {
  170. "ApiKeyAuth": []
  171. }
  172. ],
  173. "produces": [
  174. "application/json"
  175. ],
  176. "tags": [
  177. "产能预售"
  178. ],
  179. "summary": "查询产能预售商品扩展信息",
  180. "parameters": [
  181. {
  182. "type": "integer",
  183. "description": "预售商品ID",
  184. "name": "goodsid",
  185. "in": "query"
  186. },
  187. {
  188. "type": "integer",
  189. "description": "预售市场ID",
  190. "name": "marketid",
  191. "in": "query"
  192. },
  193. {
  194. "type": "integer",
  195. "description": "预售模式 - 1:一口价 2:大宗式竞拍",
  196. "name": "presalemode",
  197. "in": "query"
  198. }
  199. ],
  200. "responses": {
  201. "200": {
  202. "description": "OK",
  203. "schema": {
  204. "$ref": "#/definitions/cptrade.Cptradepresalegoodsex"
  205. }
  206. },
  207. "500": {
  208. "description": "Internal Server Error",
  209. "schema": {
  210. "$ref": "#/definitions/app.Response"
  211. }
  212. }
  213. }
  214. }
  215. },
  216. "/WRTrade/GetAllDeliveryGoods": {
  217. "get": {
  218. "security": [
  219. {
  220. "ApiKeyAuth": []
  221. }
  222. ],
  223. "produces": [
  224. "application/json"
  225. ],
  226. "tags": [
  227. "仓单贸易"
  228. ],
  229. "summary": "获取带仓单分类的种类信息",
  230. "responses": {
  231. "200": {
  232. "description": "OK",
  233. "schema": {
  234. "$ref": "#/definitions/app.Response"
  235. }
  236. },
  237. "500": {
  238. "description": "Internal Server Error",
  239. "schema": {
  240. "$ref": "#/definitions/app.Response"
  241. }
  242. }
  243. }
  244. }
  245. }
  246. },
  247. "definitions": {
  248. "app.Response": {
  249. "type": "object",
  250. "properties": {
  251. "code": {
  252. "type": "integer"
  253. },
  254. "data": {
  255. "type": "object"
  256. },
  257. "msg": {
  258. "type": "string"
  259. }
  260. }
  261. },
  262. "cptrade.Cptradepositioncancel": {
  263. "type": "object",
  264. "required": [
  265. "cancelid"
  266. ],
  267. "properties": {
  268. "accountid": {
  269. "description": "申请人账户ID",
  270. "type": "integer"
  271. },
  272. "applystatus": {
  273. "description": "申请状态 - 1:已提交 2:初审通过 3:初审拒绝 4:初审失败 5复审通过 6:复审拒绝 7:复审失败 8:已撤销",
  274. "type": "integer"
  275. },
  276. "applytime": {
  277. "description": "申请时间",
  278. "type": "string"
  279. },
  280. "cancelid": {
  281. "description": "注销ID(SEQ_CPTRADE_POSITIONCANCEL)",
  282. "type": "integer"
  283. },
  284. "cancelqty": {
  285. "description": "注销数量",
  286. "type": "integer"
  287. },
  288. "createtime": {
  289. "description": "创建时间",
  290. "type": "string"
  291. },
  292. "creatorid": {
  293. "description": "创建人",
  294. "type": "integer"
  295. },
  296. "goodscode": {
  297. "description": "订单商品代码",
  298. "type": "string"
  299. },
  300. "goodsid": {
  301. "description": "商品ID",
  302. "type": "integer"
  303. },
  304. "goodsname": {
  305. "description": "订单商品名称",
  306. "type": "string"
  307. },
  308. "goodunit": {
  309. "description": "报价单位",
  310. "type": "string"
  311. },
  312. "handlestatus": {
  313. "description": "处理状态",
  314. "type": "integer"
  315. },
  316. "marketid": {
  317. "description": "市场ID",
  318. "type": "integer"
  319. },
  320. "marketname": {
  321. "description": "市场名称",
  322. "type": "string"
  323. },
  324. "tradedate": {
  325. "description": "交易日(yyyyMMdd)",
  326. "type": "string"
  327. },
  328. "userid": {
  329. "description": "申请人ID",
  330. "type": "integer"
  331. }
  332. }
  333. },
  334. "cptrade.Cptradepresaleapply": {
  335. "type": "object",
  336. "required": [
  337. "applyid"
  338. ],
  339. "properties": {
  340. "accountid": {
  341. "description": "申请人账户ID",
  342. "type": "integer"
  343. },
  344. "applyid": {
  345. "description": "申请ID(181+Unix秒时间戳(10位)+xxxxxx)",
  346. "type": "integer"
  347. },
  348. "applystatus": {
  349. "description": "申请状态 - 1:已提交 2:初审通过 3:初审拒绝 4:初审失败 5复审通过 6:复审拒绝 7:复审失败 8:已撤销",
  350. "type": "integer"
  351. },
  352. "applytime": {
  353. "description": "申请时间",
  354. "type": "string"
  355. },
  356. "attachmenturl": {
  357. "description": "附件地址",
  358. "type": "string"
  359. },
  360. "endtime": {
  361. "description": "预售结束时间",
  362. "type": "string"
  363. },
  364. "goodscode": {
  365. "description": "商品代码",
  366. "type": "string"
  367. },
  368. "goodsname": {
  369. "description": "商品名称",
  370. "type": "string"
  371. },
  372. "goodunit": {
  373. "description": "报价单位",
  374. "type": "string"
  375. },
  376. "handlestatus": {
  377. "description": "处理状态",
  378. "type": "integer"
  379. },
  380. "marketid": {
  381. "description": "预售市场ID",
  382. "type": "integer"
  383. },
  384. "marketname": {
  385. "description": "预售市场名称",
  386. "type": "string"
  387. },
  388. "presaleqty": {
  389. "description": "预售数量",
  390. "type": "integer"
  391. },
  392. "relatedgoodscode": {
  393. "description": "关联交易合约代码",
  394. "type": "string"
  395. },
  396. "relatedgoodsid": {
  397. "description": "关联交易合约ID",
  398. "type": "integer"
  399. },
  400. "relatedgoodsname": {
  401. "description": "关联交易合约名称",
  402. "type": "string"
  403. },
  404. "starttime": {
  405. "description": "预售开始时间",
  406. "type": "string"
  407. },
  408. "tradedate": {
  409. "description": "交易日(yyyyMMdd)",
  410. "type": "string"
  411. },
  412. "trademode": {
  413. "description": "交易模式 - 16:挂牌点选 21:大宗竞拍",
  414. "type": "integer"
  415. },
  416. "userid": {
  417. "description": "申请人ID",
  418. "type": "integer"
  419. }
  420. }
  421. },
  422. "cptrade.Cptradepresalegoodsex": {
  423. "type": "object",
  424. "required": [
  425. "goodsid"
  426. ],
  427. "properties": {
  428. "attachmenturl": {
  429. "description": "附件地址",
  430. "type": "string"
  431. },
  432. "createtime": {
  433. "description": "创建时间",
  434. "type": "string"
  435. },
  436. "endtime": {
  437. "description": "预售结束时间",
  438. "type": "string"
  439. },
  440. "floorprice": {
  441. "description": "底价[大宗式竞拍]",
  442. "type": "number"
  443. },
  444. "goodsid": {
  445. "description": "商品ID(预售)",
  446. "type": "integer"
  447. },
  448. "marketid": {
  449. "description": "预售市场ID - 根据预售模式选择市场",
  450. "type": "integer"
  451. },
  452. "presaledamount": {
  453. "description": "已预售总金额(预售结束时更新)",
  454. "type": "number"
  455. },
  456. "presaledqty": {
  457. "description": "已预售量(预售结束时更新)",
  458. "type": "integer"
  459. },
  460. "presalemode": {
  461. "description": "预售模式 - 1:一口价 2:大宗式竞拍",
  462. "type": "integer"
  463. },
  464. "presaleqty": {
  465. "description": "预售数量",
  466. "type": "integer"
  467. },
  468. "refprice": {
  469. "description": "参考价格[一口价]",
  470. "type": "number"
  471. },
  472. "relatedgoodsid": {
  473. "description": "关联交易合约ID",
  474. "type": "integer"
  475. },
  476. "relatedmarketid": {
  477. "description": "关联交易合约市场ID",
  478. "type": "integer"
  479. },
  480. "sellstatus": {
  481. "description": "卖方处理状态 - 1:卖方头寸未处理 2:卖方头寸已处理",
  482. "type": "integer"
  483. },
  484. "startprice": {
  485. "description": "起拍价[大宗式竞拍]",
  486. "type": "number"
  487. },
  488. "starttime": {
  489. "description": "预售开始时间",
  490. "type": "string"
  491. },
  492. "tradedate": {
  493. "description": "交易日(yyyyMMdd)",
  494. "type": "string"
  495. }
  496. }
  497. },
  498. "cptrade.Cptradeusergoodsdata": {
  499. "type": "object",
  500. "required": [
  501. "accountid",
  502. "goodsid"
  503. ],
  504. "properties": {
  505. "EnabledQty": {
  506. "description": "可用量",
  507. "type": "integer"
  508. },
  509. "GoodsCode": {
  510. "description": "订单商品代码",
  511. "type": "string"
  512. },
  513. "GoodsName": {
  514. "description": "订单商品名称",
  515. "type": "string"
  516. },
  517. "WRStandardCode": {
  518. "description": "仓单标准代码",
  519. "type": "string"
  520. },
  521. "WRStandardName": {
  522. "description": "仓单标准名称",
  523. "type": "string"
  524. },
  525. "accountid": {
  526. "description": "账户ID",
  527. "type": "integer"
  528. },
  529. "cancelqty": {
  530. "description": "注销量",
  531. "type": "integer"
  532. },
  533. "curpresaleqty": {
  534. "description": "当前预售量",
  535. "type": "integer"
  536. },
  537. "deliveryqty": {
  538. "description": "交割量",
  539. "type": "integer"
  540. },
  541. "freezeamount": {
  542. "description": "冻结金额",
  543. "type": "number"
  544. },
  545. "goodsid": {
  546. "description": "商品ID",
  547. "type": "integer"
  548. },
  549. "goodunit": {
  550. "description": "报价单位",
  551. "type": "string"
  552. },
  553. "hasspotfreeze": {
  554. "description": "是否有现货冻结 - 0:否 1:有",
  555. "type": "integer"
  556. },
  557. "inqty": {
  558. "description": "转入量(总数量)",
  559. "type": "integer"
  560. },
  561. "marketid": {
  562. "description": "市场ID",
  563. "type": "integer"
  564. },
  565. "presaledamount": {
  566. "description": "已预售总金额",
  567. "type": "integer"
  568. },
  569. "presaledqty": {
  570. "description": "已预售量",
  571. "type": "integer"
  572. },
  573. "userid": {
  574. "description": "用户ID",
  575. "type": "integer"
  576. },
  577. "wrstandardid": {
  578. "description": "仓单标准ID",
  579. "type": "integer"
  580. }
  581. }
  582. }
  583. },
  584. "securityDefinitions": {
  585. "ApiKeyAuth": {
  586. "type": "apiKey",
  587. "name": "Authorization",
  588. "in": "header"
  589. }
  590. }
  591. }`
  592. type swaggerInfo struct {
  593. Version string
  594. Host string
  595. BasePath string
  596. Schemes []string
  597. Title string
  598. Description string
  599. }
  600. // SwaggerInfo holds exported Swagger Info so clients can modify it
  601. var SwaggerInfo = swaggerInfo{
  602. Version: "1.0",
  603. Host: "",
  604. BasePath: "/api",
  605. Schemes: []string{},
  606. Title: "MTP2.0 查询服务 API",
  607. Description: "新的查询服务,替代原通用查询服务。",
  608. }
  609. type s struct{}
  610. func (s *s) ReadDoc() string {
  611. sInfo := SwaggerInfo
  612. sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
  613. t, err := template.New("swagger_info").Funcs(template.FuncMap{
  614. "marshal": func(v interface{}) string {
  615. a, _ := json.Marshal(v)
  616. return string(a)
  617. },
  618. }).Parse(doc)
  619. if err != nil {
  620. return doc
  621. }
  622. var tpl bytes.Buffer
  623. if err := t.Execute(&tpl, sInfo); err != nil {
  624. return doc
  625. }
  626. return tpl.String()
  627. }
  628. func init() {
  629. swag.Register(swag.Name, &s{})
  630. }