docs.go 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834
  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/QueryPositionCancel": {
  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/QueryPreasleApply": {
  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": "userid",
  95. "in": "query",
  96. "required": true
  97. },
  98. {
  99. "type": "integer",
  100. "description": "申请ID",
  101. "name": "applyid",
  102. "in": "query"
  103. },
  104. {
  105. "type": "integer",
  106. "description": "资金账户ID",
  107. "name": "accountid",
  108. "in": "query"
  109. }
  110. ],
  111. "responses": {
  112. "200": {
  113. "description": "OK",
  114. "schema": {
  115. "$ref": "#/definitions/cptrade.Cptradepresaleapply"
  116. }
  117. },
  118. "500": {
  119. "description": "Internal Server Error",
  120. "schema": {
  121. "$ref": "#/definitions/app.Response"
  122. }
  123. }
  124. }
  125. }
  126. },
  127. "/CPTrade/QueryPresaleGoodsEx": {
  128. "get": {
  129. "security": [
  130. {
  131. "ApiKeyAuth": []
  132. }
  133. ],
  134. "produces": [
  135. "application/json"
  136. ],
  137. "tags": [
  138. "产能预售"
  139. ],
  140. "summary": "查询产能预售商品扩展信息",
  141. "parameters": [
  142. {
  143. "type": "integer",
  144. "description": "预售商品ID",
  145. "name": "goodsid",
  146. "in": "query"
  147. },
  148. {
  149. "type": "integer",
  150. "description": "预售市场ID",
  151. "name": "marketid",
  152. "in": "query"
  153. },
  154. {
  155. "type": "integer",
  156. "description": "预售模式 - 1:一口价 2:大宗式竞拍",
  157. "name": "presalemode",
  158. "in": "query"
  159. },
  160. {
  161. "type": "string",
  162. "description": "预售商品ID列表 - 格式:1,2,3",
  163. "name": "goodsids",
  164. "in": "query"
  165. }
  166. ],
  167. "responses": {
  168. "200": {
  169. "description": "OK",
  170. "schema": {
  171. "$ref": "#/definitions/cptrade.Cptradepresalegoodsex"
  172. }
  173. },
  174. "500": {
  175. "description": "Internal Server Error",
  176. "schema": {
  177. "$ref": "#/definitions/app.Response"
  178. }
  179. }
  180. }
  181. }
  182. },
  183. "/CPTrade/QueryUserGoodsData": {
  184. "get": {
  185. "security": [
  186. {
  187. "ApiKeyAuth": []
  188. }
  189. ],
  190. "produces": [
  191. "application/json"
  192. ],
  193. "tags": [
  194. "产能预售"
  195. ],
  196. "summary": "查询远期订单信息",
  197. "parameters": [
  198. {
  199. "type": "integer",
  200. "description": "资金账户ID",
  201. "name": "accountid",
  202. "in": "query",
  203. "required": true
  204. }
  205. ],
  206. "responses": {
  207. "200": {
  208. "description": "OK",
  209. "schema": {
  210. "$ref": "#/definitions/cptrade.Cptradeusergoodsdata"
  211. }
  212. },
  213. "500": {
  214. "description": "Internal Server Error",
  215. "schema": {
  216. "$ref": "#/definitions/app.Response"
  217. }
  218. }
  219. }
  220. }
  221. },
  222. "/Delivery/QueryDeliveryRelation": {
  223. "get": {
  224. "security": [
  225. {
  226. "ApiKeyAuth": []
  227. }
  228. ],
  229. "produces": [
  230. "application/json"
  231. ],
  232. "tags": [
  233. "交割服务"
  234. ],
  235. "summary": "查询商品交割关系表",
  236. "parameters": [
  237. {
  238. "type": "integer",
  239. "description": "商品ID",
  240. "name": "goodsid",
  241. "in": "query"
  242. },
  243. {
  244. "type": "integer",
  245. "description": "品种ID",
  246. "name": "deliverygoodsid",
  247. "in": "query"
  248. },
  249. {
  250. "type": "integer",
  251. "description": "市场ID",
  252. "name": "marketid",
  253. "in": "query"
  254. }
  255. ],
  256. "responses": {
  257. "200": {
  258. "description": "OK",
  259. "schema": {
  260. "$ref": "#/definitions/delivery.Deliveryrelation"
  261. }
  262. },
  263. "500": {
  264. "description": "Internal Server Error",
  265. "schema": {
  266. "$ref": "#/definitions/app.Response"
  267. }
  268. }
  269. }
  270. }
  271. },
  272. "/WRTrade/GetAllDeliveryGoods": {
  273. "get": {
  274. "security": [
  275. {
  276. "ApiKeyAuth": []
  277. }
  278. ],
  279. "produces": [
  280. "application/json"
  281. ],
  282. "tags": [
  283. "仓单贸易"
  284. ],
  285. "summary": "获取带仓单分类的种类信息",
  286. "responses": {
  287. "200": {
  288. "description": "OK",
  289. "schema": {
  290. "$ref": "#/definitions/app.Response"
  291. }
  292. },
  293. "500": {
  294. "description": "Internal Server Error",
  295. "schema": {
  296. "$ref": "#/definitions/app.Response"
  297. }
  298. }
  299. }
  300. }
  301. }
  302. },
  303. "definitions": {
  304. "app.Response": {
  305. "type": "object",
  306. "properties": {
  307. "code": {
  308. "type": "integer"
  309. },
  310. "data": {
  311. "type": "object"
  312. },
  313. "msg": {
  314. "type": "string"
  315. }
  316. }
  317. },
  318. "cptrade.Cptradepositioncancel": {
  319. "type": "object",
  320. "required": [
  321. "cancelid"
  322. ],
  323. "properties": {
  324. "accountid": {
  325. "description": "申请人账户ID",
  326. "type": "integer"
  327. },
  328. "applystatus": {
  329. "description": "申请状态 - 1:已提交 2:初审通过 3:初审拒绝 4:初审失败 5复审通过 6:复审拒绝 7:复审失败 8:已撤销",
  330. "type": "integer"
  331. },
  332. "applytime": {
  333. "description": "申请时间",
  334. "type": "string"
  335. },
  336. "cancelid": {
  337. "description": "注销ID(SEQ_CPTRADE_POSITIONCANCEL)",
  338. "type": "integer"
  339. },
  340. "cancelqty": {
  341. "description": "注销数量",
  342. "type": "integer"
  343. },
  344. "createtime": {
  345. "description": "创建时间",
  346. "type": "string"
  347. },
  348. "creatorid": {
  349. "description": "创建人ID",
  350. "type": "integer"
  351. },
  352. "creatorname": {
  353. "description": "创建人",
  354. "type": "string"
  355. },
  356. "goodscode": {
  357. "description": "订单商品代码",
  358. "type": "string"
  359. },
  360. "goodsid": {
  361. "description": "商品ID",
  362. "type": "integer"
  363. },
  364. "goodsname": {
  365. "description": "订单商品名称",
  366. "type": "string"
  367. },
  368. "goodunit": {
  369. "description": "报价单位",
  370. "type": "string"
  371. },
  372. "handlestatus": {
  373. "description": "处理状态",
  374. "type": "integer"
  375. },
  376. "marketid": {
  377. "description": "市场ID",
  378. "type": "integer"
  379. },
  380. "marketname": {
  381. "description": "市场名称",
  382. "type": "string"
  383. },
  384. "tradedate": {
  385. "description": "交易日(yyyyMMdd)",
  386. "type": "string"
  387. },
  388. "userid": {
  389. "description": "申请人ID",
  390. "type": "integer"
  391. }
  392. }
  393. },
  394. "cptrade.Cptradepresaleapply": {
  395. "type": "object",
  396. "required": [
  397. "applyid"
  398. ],
  399. "properties": {
  400. "accountid": {
  401. "description": "申请人账户ID",
  402. "type": "integer"
  403. },
  404. "applyid": {
  405. "description": "申请ID(181+Unix秒时间戳(10位)+xxxxxx)",
  406. "type": "integer"
  407. },
  408. "applystatus": {
  409. "description": "申请状态 - 1:已提交 2:初审通过 3:初审拒绝 4:初审失败 5复审通过 6:复审拒绝 7:复审失败 8:已撤销",
  410. "type": "integer"
  411. },
  412. "applytime": {
  413. "description": "申请时间",
  414. "type": "string"
  415. },
  416. "attachmenturl": {
  417. "description": "附件地址",
  418. "type": "string"
  419. },
  420. "endtime": {
  421. "description": "预售结束时间",
  422. "type": "string"
  423. },
  424. "goodscode": {
  425. "description": "商品代码",
  426. "type": "string"
  427. },
  428. "goodsname": {
  429. "description": "商品名称",
  430. "type": "string"
  431. },
  432. "goodunit": {
  433. "description": "报价单位",
  434. "type": "string"
  435. },
  436. "handlestatus": {
  437. "description": "处理状态",
  438. "type": "integer"
  439. },
  440. "marketid": {
  441. "description": "预售市场ID",
  442. "type": "integer"
  443. },
  444. "marketname": {
  445. "description": "预售市场名称",
  446. "type": "string"
  447. },
  448. "presaleqty": {
  449. "description": "预售数量",
  450. "type": "integer"
  451. },
  452. "relatedgoodscode": {
  453. "description": "关联交易合约代码",
  454. "type": "string"
  455. },
  456. "relatedgoodsid": {
  457. "description": "关联交易合约ID",
  458. "type": "integer"
  459. },
  460. "relatedgoodsname": {
  461. "description": "关联交易合约名称",
  462. "type": "string"
  463. },
  464. "starttime": {
  465. "description": "预售开始时间",
  466. "type": "string"
  467. },
  468. "tradedate": {
  469. "description": "交易日(yyyyMMdd)",
  470. "type": "string"
  471. },
  472. "trademode": {
  473. "description": "交易模式 - 16:挂牌点选 21:大宗竞拍",
  474. "type": "integer"
  475. },
  476. "userid": {
  477. "description": "申请人ID",
  478. "type": "integer"
  479. }
  480. }
  481. },
  482. "cptrade.Cptradepresalegoodsex": {
  483. "type": "object",
  484. "required": [
  485. "goodsid"
  486. ],
  487. "properties": {
  488. "attachmenturl": {
  489. "description": "附件地址",
  490. "type": "string"
  491. },
  492. "createtime": {
  493. "description": "创建时间",
  494. "type": "string"
  495. },
  496. "endtime": {
  497. "description": "预售结束时间",
  498. "type": "string"
  499. },
  500. "floorprice": {
  501. "description": "底价[大宗式竞拍]",
  502. "type": "number"
  503. },
  504. "goodsdetail": {
  505. "description": "详情[大宗]",
  506. "type": "string"
  507. },
  508. "goodsid": {
  509. "description": "商品ID(预售)",
  510. "type": "integer"
  511. },
  512. "marketid": {
  513. "description": "预售市场ID - 根据预售模式选择市场",
  514. "type": "integer"
  515. },
  516. "presaledamount": {
  517. "description": "已预售总金额(预售结束时更新)",
  518. "type": "number"
  519. },
  520. "presaledqty": {
  521. "description": "已预售量(预售结束时更新)",
  522. "type": "integer"
  523. },
  524. "presalemode": {
  525. "description": "预售模式 - 1:一口价 2:大宗式竞拍",
  526. "type": "integer"
  527. },
  528. "presaleqty": {
  529. "description": "预售数量",
  530. "type": "integer"
  531. },
  532. "refprice": {
  533. "description": "参考价格[一口价]",
  534. "type": "number"
  535. },
  536. "relatedgoodsid": {
  537. "description": "关联交易合约ID",
  538. "type": "integer"
  539. },
  540. "relatedmarketid": {
  541. "description": "关联交易合约市场ID",
  542. "type": "integer"
  543. },
  544. "sellstatus": {
  545. "description": "卖方处理状态 - 1:卖方头寸未处理 2:卖方头寸已处理",
  546. "type": "integer"
  547. },
  548. "startprice": {
  549. "description": "起拍价[大宗式竞拍]",
  550. "type": "number"
  551. },
  552. "starttime": {
  553. "description": "预售开始时间",
  554. "type": "string"
  555. },
  556. "tradedate": {
  557. "description": "交易日(yyyyMMdd)",
  558. "type": "string"
  559. },
  560. "tradeprice": {
  561. "description": "成交价[大宗]",
  562. "type": "number"
  563. }
  564. }
  565. },
  566. "cptrade.Cptradeusergoodsdata": {
  567. "type": "object",
  568. "required": [
  569. "accountid",
  570. "goodsid"
  571. ],
  572. "properties": {
  573. "EnabledQty": {
  574. "description": "可用量",
  575. "type": "integer"
  576. },
  577. "GoodsCode": {
  578. "description": "订单商品代码",
  579. "type": "string"
  580. },
  581. "GoodsName": {
  582. "description": "订单商品名称",
  583. "type": "string"
  584. },
  585. "WRStandardCode": {
  586. "description": "仓单标准代码",
  587. "type": "string"
  588. },
  589. "WRStandardName": {
  590. "description": "仓单标准名称",
  591. "type": "string"
  592. },
  593. "accountid": {
  594. "description": "账户ID",
  595. "type": "integer"
  596. },
  597. "cancelqty": {
  598. "description": "注销量",
  599. "type": "integer"
  600. },
  601. "curpresaleqty": {
  602. "description": "当前预售量",
  603. "type": "integer"
  604. },
  605. "deliveryqty": {
  606. "description": "交割量",
  607. "type": "integer"
  608. },
  609. "freezeamount": {
  610. "description": "冻结金额",
  611. "type": "number"
  612. },
  613. "goodsid": {
  614. "description": "商品ID",
  615. "type": "integer"
  616. },
  617. "goodunit": {
  618. "description": "报价单位",
  619. "type": "string"
  620. },
  621. "hasspotfreeze": {
  622. "description": "是否有现货冻结 - 0:否 1:有",
  623. "type": "integer"
  624. },
  625. "inqty": {
  626. "description": "转入量(总数量)",
  627. "type": "integer"
  628. },
  629. "marketid": {
  630. "description": "市场ID",
  631. "type": "integer"
  632. },
  633. "presaledamount": {
  634. "description": "已预售总金额",
  635. "type": "integer"
  636. },
  637. "presaledqty": {
  638. "description": "已预售量",
  639. "type": "integer"
  640. },
  641. "userid": {
  642. "description": "用户ID",
  643. "type": "integer"
  644. },
  645. "wrstandardid": {
  646. "description": "仓单标准ID",
  647. "type": "integer"
  648. }
  649. }
  650. },
  651. "delivery.Deliveryrelation": {
  652. "type": "object",
  653. "required": [
  654. "begindate",
  655. "enddate",
  656. "goodsid",
  657. "mindeliveryqty",
  658. "xdeliveryratio"
  659. ],
  660. "properties": {
  661. "begindate": {
  662. "description": "起始日期(yyyyMMdd)",
  663. "type": "string"
  664. },
  665. "buytemplateid": {
  666. "description": "买履约计划模板ID",
  667. "type": "integer"
  668. },
  669. "deliverygoodscode": {
  670. "description": "品种代码",
  671. "type": "string"
  672. },
  673. "deliverygoodsid": {
  674. "description": "交割商品",
  675. "type": "integer"
  676. },
  677. "deliverygoodsname": {
  678. "description": "品种名称",
  679. "type": "string"
  680. },
  681. "deliverymode": {
  682. "description": "交割方式 - 1:点选式 2:申报式",
  683. "type": "integer"
  684. },
  685. "deliverypricerule": {
  686. "description": "交割价规则- 1:行情价 2:建仓价",
  687. "type": "integer"
  688. },
  689. "deliverytype": {
  690. "description": "交割模式 - 1:X交割 2:X+P交割 3:X+C交割 4:X+P+C交割",
  691. "type": "integer"
  692. },
  693. "enddate": {
  694. "description": "结束日期(yyyyMMdd)",
  695. "type": "string"
  696. },
  697. "goodscode": {
  698. "description": "商品代码",
  699. "type": "string"
  700. },
  701. "goodsid": {
  702. "description": "交易合约ID",
  703. "type": "integer"
  704. },
  705. "goodsname": {
  706. "description": "商品名称",
  707. "type": "string"
  708. },
  709. "marketid": {
  710. "description": "市场ID",
  711. "type": "integer"
  712. },
  713. "mindeliveryqty": {
  714. "description": "最小交割系数(K)",
  715. "type": "integer"
  716. },
  717. "p2deliveryprice": {
  718. "description": "P2合约价格(商品价时填写0,固定值时填写固定值)",
  719. "type": "number"
  720. },
  721. "p2deliveryratio": {
  722. "description": "P2合约系数(p)",
  723. "type": "integer"
  724. },
  725. "p2goodsid": {
  726. "description": "P2合约ID",
  727. "type": "integer"
  728. },
  729. "p2pricemode": {
  730. "description": "P2合约价格方式 - 1:商品价 2:固定值",
  731. "type": "integer"
  732. },
  733. "pdeliveryprice": {
  734. "description": "P合约价格(商品价时填写0,固定值时填写固定值)",
  735. "type": "number"
  736. },
  737. "pdeliveryratio": {
  738. "description": "P合约系数(n)",
  739. "type": "integer"
  740. },
  741. "pgoodsid": {
  742. "description": "P合约ID",
  743. "type": "integer"
  744. },
  745. "ppricemode": {
  746. "description": "P合约价格方式 - 1:商品价 2:固定值",
  747. "type": "integer"
  748. },
  749. "rratio": {
  750. "description": "兑换系数(R)",
  751. "type": "integer"
  752. },
  753. "rratio1": {
  754. "description": "兑换系数(交易合约)(R1)",
  755. "type": "integer"
  756. },
  757. "rratio2": {
  758. "description": "兑换系数(仓单标准)(R2)",
  759. "type": "integer"
  760. },
  761. "selltemplateid": {
  762. "description": "卖履约计划模板ID",
  763. "type": "integer"
  764. },
  765. "wrstandardid": {
  766. "description": "仓单标准ID",
  767. "type": "integer"
  768. },
  769. "xdeliveryratio": {
  770. "description": "交易合约系数(m)",
  771. "type": "integer"
  772. }
  773. }
  774. }
  775. },
  776. "securityDefinitions": {
  777. "ApiKeyAuth": {
  778. "type": "apiKey",
  779. "name": "Authorization",
  780. "in": "header"
  781. }
  782. }
  783. }`
  784. type swaggerInfo struct {
  785. Version string
  786. Host string
  787. BasePath string
  788. Schemes []string
  789. Title string
  790. Description string
  791. }
  792. // SwaggerInfo holds exported Swagger Info so clients can modify it
  793. var SwaggerInfo = swaggerInfo{
  794. Version: "1.0",
  795. Host: "",
  796. BasePath: "/api",
  797. Schemes: []string{},
  798. Title: "MTP2.0 查询服务 API",
  799. Description: "新的查询服务,替代原通用查询服务。",
  800. }
  801. type s struct{}
  802. func (s *s) ReadDoc() string {
  803. sInfo := SwaggerInfo
  804. sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
  805. t, err := template.New("swagger_info").Funcs(template.FuncMap{
  806. "marshal": func(v interface{}) string {
  807. a, _ := json.Marshal(v)
  808. return string(a)
  809. },
  810. }).Parse(doc)
  811. if err != nil {
  812. return doc
  813. }
  814. var tpl bytes.Buffer
  815. if err := t.Execute(&tpl, sInfo); err != nil {
  816. return doc
  817. }
  818. return tpl.String()
  819. }
  820. func init() {
  821. swag.Register(swag.Name, &s{})
  822. }