docs.go 6.3 KB

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