qryWrTrade.go 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. /**
  2. * @Author: zou.yingbin
  3. * @Create : 2021/7/20 18:30
  4. * @Modify : 2021/7/20 18:30
  5. */
  6. package wrTrade2
  7. import (
  8. "github.com/gin-gonic/gin"
  9. "mtp2_if/global/app"
  10. "mtp2_if/models"
  11. )
  12. // QueryOrderQuote
  13. // @Summary 查询大厅行情列表
  14. // @Produce json
  15. // @Security ApiKeyAuth
  16. // @Param page query int false "页码"
  17. // @Param pagesize query int false "每页条数"
  18. // @Param marketid query int false "仓单贸易市场id"
  19. // @Param wrpricetype query int true "价格方式 - 1:固定价 2-浮动价"
  20. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  21. // @Param wrstandardname query string false "商品名称(筛选条件)"
  22. // @Param brandname query string false "品牌名称(筛选条件)"
  23. // @Param warehouseid query int false "仓库id(筛选条件)"
  24. // @Param deliverygoodsid query int false "品种id"
  25. // @Success 200 {array} models.WrOrderQuote
  26. // @Failure 500 {object} app.Response
  27. // @Router /WrTrade2/QueryOrderQuote [get]
  28. // @Tags 仓单贸易v2
  29. func QueryOrderQuote(c *gin.Context) {
  30. a := app.GinUtils{Gin: app.Gin{C: c}}
  31. m := models.WrOrderQuote{}
  32. a.DoBindReq(&m)
  33. a.DoGetDataByPage(&m)
  34. }
  35. // QueryOrderQuoteDetail
  36. // @Summary 查询买卖大厅
  37. // @Produce json
  38. // @Security ApiKeyAuth
  39. // @Param page query int false "页码"
  40. // @Param pagesize query int false "每页条数"
  41. // @Param marketid query int false "仓单贸易市场id"
  42. // @Param wrpricetype query int true "价格方式 - 1:固定价 2-浮动价"
  43. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  44. // @Param wrfactortypeid query int true "仓单要素id"
  45. // @Param goodsid query int false "期货商品id(浮动价方式时填)"
  46. // @Param buyorsell query int true "买卖方向 0-买 1-卖"
  47. // @Success 200 {array} models.WrOrderQuoteDetail
  48. // @Failure 500 {object} app.Response
  49. // @Router /WrTrade2/QueryOrderQuoteDetail [get]
  50. // @Tags 仓单贸易v2
  51. func QueryOrderQuoteDetail(c *gin.Context) {
  52. a := app.GinUtils{Gin: app.Gin{C: c}}
  53. m := models.WrOrderQuoteDetail{}
  54. a.DoBindReq(&m)
  55. a.DoGetDataByPage(&m)
  56. }
  57. // QueryWrPosition
  58. // @Summary 查询现货(预售)仓单持仓
  59. // @Description 页面 现货仓单->现货汇总/库存汇总; 预售仓单->订单汇总
  60. // @Produce json
  61. // @Security ApiKeyAuth
  62. // @Param userid query int true "用户id"
  63. // @Param querytype query int true "查询类型 1-现货汇总 2-库存汇总(订单汇总)"
  64. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  65. // @Success 200 {array} models.WrPosition
  66. // @Failure 500 {object} app.Response
  67. // @Router /WrTrade2/QueryWrPosition [get]
  68. // @Tags 仓单贸易v2
  69. func QueryWrPosition(c *gin.Context) {
  70. a := app.GinUtils{Gin: app.Gin{C: c}}
  71. m := models.WrPosition{}
  72. a.DoBindReq(&m)
  73. a.DoGetDataI(&m)
  74. }
  75. // QueryWrOrderDetail
  76. // @Summary 查询仓单委托单(挂单)
  77. // @Description 页面 现货仓单 | 预售仓单 -> 挂单
  78. // @Produce json
  79. // @Security ApiKeyAuth
  80. // @Param page query int false "页码"
  81. // @Param pagesize query int false "每页条数"
  82. // @Param userid query int true "用户id"
  83. // @Param marketid query int false "仓单贸易市场id"
  84. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  85. // @Success 200 {array} models.WrOrderDetail
  86. // @Failure 500 {object} app.Response
  87. // @Router /WrTrade2/QueryWrOrderDetail [get]
  88. // @Tags 仓单贸易v2
  89. func QueryWrOrderDetail(c *gin.Context) {
  90. a := app.GinUtils{Gin: app.Gin{C: c}}
  91. m := models.WrOrderDetail{}
  92. a.DoBindReq(&m)
  93. a.DoGetDataByPage(&m)
  94. }
  95. // QueryWrSpecialMatchOrder
  96. // @Summary 查询指定成交
  97. // @Description 页面 现货仓单 | 预售仓单 -> 指定成交
  98. // @Produce json
  99. // @Security ApiKeyAuth
  100. // @Param page query int false "页码"
  101. // @Param pagesize query int false "每页条数"
  102. // @Param userid query int true "用户id"
  103. // @Param marketid query int false "仓单贸易市场id"
  104. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  105. // @Success 200 {array} models.WrSpecialMatchOrder
  106. // @Failure 500 {object} app.Response
  107. // @Router /WrTrade2/QueryWrSpecialMatchOrder [get]
  108. // @Tags 仓单贸易v2
  109. func QueryWrSpecialMatchOrder(c *gin.Context) {
  110. a := app.GinUtils{Gin: app.Gin{C: c}}
  111. m := models.WrSpecialMatchOrder{}
  112. a.DoBindReq(&m)
  113. a.DoGetDataByPage(&m)
  114. }
  115. // QueryWrTradeDetail
  116. // @Summary 查询仓单成交明细
  117. // @Produce json
  118. // @Security ApiKeyAuth
  119. // @Param page query int false "页码"
  120. // @Param pagesize query int false "每页条数"
  121. // @Param userid query int true "用户id"
  122. // @Param marketid query int false "仓单贸易市场id"
  123. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  124. // @Success 200 {array} models.WrTradeDetail
  125. // @Failure 500 {object} app.Response
  126. // @Router /WrTrade2/QueryWrTradeDetail [get]
  127. // @Tags 仓单贸易v2
  128. func QueryWrTradeDetail(c *gin.Context) {
  129. a := app.GinUtils{Gin: app.Gin{C: c}}
  130. m := models.WrTradeDetail{}
  131. a.DoBindReq(&m)
  132. a.DoGetDataByPage(&m)
  133. }
  134. // QueryWrGoodsInfo
  135. // @Summary 查询仓单商品信息
  136. // @Produce json
  137. // @Security ApiKeyAuth
  138. // @Param marketid query int false "仓单贸易市场id"
  139. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  140. // @Param wrfactortypeid query int true "仓单要素id"
  141. // @Success 200 {array} models.WrGoodsInfo
  142. // @Failure 500 {object} app.Response
  143. // @Router /WrTrade2/QueryWrGoodsInfo [get]
  144. // @Tags 仓单贸易v2
  145. func QueryWrGoodsInfo(c *gin.Context) {
  146. a := app.GinUtils{Gin: app.Gin{C: c}}
  147. m := models.WrGoodsInfo{}
  148. a.DoBindReq(&m)
  149. a.DoGetDataI(&m)
  150. }
  151. // QueryPerformancePlan
  152. // @Summary 查询履约信息
  153. // @Produce json
  154. // @Security ApiKeyAuth
  155. // @Param userid query int true "用户id"
  156. // @Param buyorsell query int true "买卖方向 0-买 1-卖"
  157. // @Success 200 {array} models.WrPerformancePlan
  158. // @Failure 500 {object} app.Response
  159. // @Router /WrTrade2/QueryPerformancePlan [get]
  160. // @Tags 仓单贸易v2
  161. func QueryPerformancePlan(c *gin.Context) {
  162. a := app.GinUtils{Gin: app.Gin{C: c}}
  163. m := models.WrPerformancePlan{}
  164. a.DoBindReq(&m)
  165. a.DoGetDataI(&m)
  166. }
  167. // QueryHoldLB
  168. // @Summary 查询仓单持有记录
  169. // @Description 页面 现货仓单->现货明细? , 表名叫仓单持有记录, 有挂单特有维度,为防误解汇总也有相关维度, 新写接口,不跟汇总合在一起了。
  170. // @Produce json
  171. // @Security ApiKeyAuth
  172. // @Param accountid query int true "资金账号"
  173. // @Param warehouseid query int false "仓库id"
  174. // @Param deliverygoodsid query int false "品种id"
  175. // @Param wrstandardid query int false "品类id"
  176. // @Success 200 {array} models.WrHoldLB
  177. // @Failure 500 {object} app.Response
  178. // @Router /WrTrade2/QueryHoldLB [get]
  179. // @Tags 仓单贸易v2
  180. func QueryHoldLB(c *gin.Context) {
  181. a := app.GinUtils{Gin: app.Gin{C: c}}
  182. m := models.WrHoldLB{}
  183. a.DoBindReq(&m)
  184. a.DoGetDataI(&m)
  185. }
  186. // QueryFilterItem
  187. // @Summary 查询筛选框列表
  188. // @Produce json
  189. // @Security ApiKeyAuth
  190. // @Param itype query string true "类型(可多选,逗号隔开) 1-品种 2-品类(商品) 3-仓库"
  191. // @Success 200 {array} models.WrFilterItem
  192. // @Failure 500 {object} app.Response
  193. // @Router /WrTrade2/QueryFilterItem [get]
  194. // @Tags 仓单贸易v2
  195. func QueryFilterItem(c *gin.Context) {
  196. a := app.GinUtils{Gin: app.Gin{C: c}}
  197. m := models.WrFilterItem{}
  198. a.DoBindReq(&m)
  199. a.DoGetDataI(&m)
  200. }
  201. // QueryFaProductDetail
  202. // @Summary 查询融资产品列表
  203. // @Description 页面 买卖大厅 -> 选择融资方案
  204. // @Produce json
  205. // @Security ApiKeyAuth
  206. // @Param wrfactortypeid query int true "仓单要素id"
  207. // @Success 200 {array} models.WrFAProductDetail
  208. // @Failure 500 {object} app.Response
  209. // @Router /WrTrade2/QueryFaProductDetail [get]
  210. // @Tags 仓单贸易v2
  211. func QueryFaProductDetail(c *gin.Context) {
  212. a := app.GinUtils{Gin: app.Gin{C: c}}
  213. m := models.WrFAProductDetail{}
  214. a.DoBindReq(&m)
  215. a.DoGetDataI(&m)
  216. }
  217. // QueryWrFactorTypeInfo
  218. // @Summary 查询仓单要素详细信息
  219. // @Produce json
  220. // @Security ApiKeyAuth
  221. // @Param wrfactortypeid query int true "仓单要素id"
  222. // @Success 200 {array} models.WrFactorTypeInfo
  223. // @Failure 500 {object} app.Response
  224. // @Router /WrTrade2/QueryWrFactorTypeInfo [get]
  225. // @Tags 仓单贸易v2
  226. func QueryWrFactorTypeInfo(c *gin.Context) {
  227. a := app.GinUtils{Gin: app.Gin{C: c}}
  228. m := models.WrFactorTypeInfo{}
  229. a.DoBindReq(&m)
  230. a.DoGetDataI(&m)
  231. }
  232. // QueryWrMarketTradeConfig
  233. // @Summary 查询市场交易参数配置
  234. // @Produce json
  235. // @Security ApiKeyAuth
  236. // @Param marketid query int false "市场id"
  237. // @Success 200 {array} models.WrMarketTradeConfig
  238. // @Failure 500 {object} app.Response
  239. // @Router /WrTrade2/QueryWrMarketTradeConfig [get]
  240. // @Tags 仓单贸易v2
  241. func QueryWrMarketTradeConfig(c *gin.Context) {
  242. a := app.GinUtils{Gin: app.Gin{C: c}}
  243. m := models.WrMarketTradeConfig{}
  244. a.DoBindReq(&m)
  245. a.DoGetDataI(&m)
  246. }