docs.go 32 KB

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