docs.go 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  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/QueryPreasleApply": {
  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": "applyid",
  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.Cptradepresaleapply"
  65. }
  66. },
  67. "500": {
  68. "description": "Internal Server Error",
  69. "schema": {
  70. "$ref": "#/definitions/app.Response"
  71. }
  72. }
  73. }
  74. }
  75. }
  76. },
  77. "definitions": {
  78. "app.Response": {
  79. "type": "object",
  80. "properties": {
  81. "code": {
  82. "type": "integer"
  83. },
  84. "data": {
  85. "type": "object"
  86. },
  87. "msg": {
  88. "type": "string"
  89. }
  90. }
  91. },
  92. "cptrade.Cptradepresaleapply": {
  93. "type": "object",
  94. "required": [
  95. "applyid"
  96. ],
  97. "properties": {
  98. "accountid": {
  99. "description": "申请人账户ID",
  100. "type": "integer"
  101. },
  102. "applyid": {
  103. "description": "申请ID(181+Unix秒时间戳(10位)+xxxxxx)",
  104. "type": "integer"
  105. },
  106. "applystatus": {
  107. "description": "申请状态 - 1:已提交 2:初审通过 3:初审拒绝 4:初审失败 5复审通过 6:复审拒绝 7:复审失败 8:已撤销",
  108. "type": "integer"
  109. },
  110. "applytime": {
  111. "description": "申请时间",
  112. "type": "string"
  113. },
  114. "attachmenturl": {
  115. "description": "附件地址",
  116. "type": "string"
  117. },
  118. "endtime": {
  119. "description": "预售结束时间",
  120. "type": "string"
  121. },
  122. "firstremark": {
  123. "description": "初审备注",
  124. "type": "string"
  125. },
  126. "goodscode": {
  127. "description": "商品代码",
  128. "type": "string"
  129. },
  130. "goodsname": {
  131. "description": "商品名称",
  132. "type": "string"
  133. },
  134. "handlestatus": {
  135. "description": "处理状态",
  136. "type": "integer"
  137. },
  138. "marketid": {
  139. "description": "预售市场ID",
  140. "type": "integer"
  141. },
  142. "presaleqty": {
  143. "description": "预售数量",
  144. "type": "integer"
  145. },
  146. "relatedgoodsid": {
  147. "description": "关联交易合约ID",
  148. "type": "integer"
  149. },
  150. "secondremark": {
  151. "description": "复审备注",
  152. "type": "string"
  153. },
  154. "starttime": {
  155. "description": "预售开始时间",
  156. "type": "string"
  157. },
  158. "tradedate": {
  159. "description": "交易日(yyyyMMdd)",
  160. "type": "string"
  161. },
  162. "userid": {
  163. "description": "申请人ID",
  164. "type": "integer"
  165. }
  166. }
  167. }
  168. },
  169. "securityDefinitions": {
  170. "ApiKeyAuth": {
  171. "type": "apiKey",
  172. "name": "token",
  173. "in": "header"
  174. }
  175. }
  176. }`
  177. type swaggerInfo struct {
  178. Version string
  179. Host string
  180. BasePath string
  181. Schemes []string
  182. Title string
  183. Description string
  184. }
  185. // SwaggerInfo holds exported Swagger Info so clients can modify it
  186. var SwaggerInfo = swaggerInfo{
  187. Version: "1.0",
  188. Host: "",
  189. BasePath: "/api",
  190. Schemes: []string{},
  191. Title: "MTP2.0 查询服务 API",
  192. Description: "新的查询服务,替代原通用查询服务。",
  193. }
  194. type s struct{}
  195. func (s *s) ReadDoc() string {
  196. sInfo := SwaggerInfo
  197. sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
  198. t, err := template.New("swagger_info").Funcs(template.FuncMap{
  199. "marshal": func(v interface{}) string {
  200. a, _ := json.Marshal(v)
  201. return string(a)
  202. },
  203. }).Parse(doc)
  204. if err != nil {
  205. return doc
  206. }
  207. var tpl bytes.Buffer
  208. if err := t.Execute(&tpl, sInfo); err != nil {
  209. return doc
  210. }
  211. return tpl.String()
  212. }
  213. func init() {
  214. swag.Register(swag.Name, &s{})
  215. }