docs.go 21 KB

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