docs.go 5.9 KB

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