docs.go 32 KB

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