qryWrTrade.go 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  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. // @Success 200 {array} models.WrPosition
  65. // @Failure 500 {object} app.Response
  66. // @Router /WrTrade2/QueryWrPosition [get]
  67. // @Tags 仓单贸易v2
  68. func QueryWrPosition(c *gin.Context) {
  69. a := app.GinUtils{Gin: app.Gin{C: c}}
  70. m := models.WrPosition{}
  71. a.DoBindReq(&m)
  72. a.DoGetDataI(&m)
  73. }
  74. // QueryWrOrderDetail
  75. // @Summary 查询仓单委托单(挂单)
  76. // @Description 页面 现货仓单 | 预售仓单 -> 挂单
  77. // @Produce json
  78. // @Security ApiKeyAuth
  79. // @Param page query int false "页码"
  80. // @Param pagesize query int false "每页条数"
  81. // @Param userid query int true "用户id"
  82. // @Param marketid query int false "仓单贸易市场id"
  83. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  84. // @Success 200 {array} models.WrOrderDetail
  85. // @Failure 500 {object} app.Response
  86. // @Router /WrTrade2/QueryWrOrderDetail [get]
  87. // @Tags 仓单贸易v2
  88. func QueryWrOrderDetail(c *gin.Context) {
  89. a := app.GinUtils{Gin: app.Gin{C: c}}
  90. m := models.WrOrderDetail{}
  91. a.DoBindReq(&m)
  92. a.DoGetDataByPage(&m)
  93. }
  94. // QueryWrSpecialMatchOrder
  95. // @Summary 查询指定成交
  96. // @Description 页面 现货仓单 | 预售仓单 -> 指定成交
  97. // @Produce json
  98. // @Security ApiKeyAuth
  99. // @Param page query int false "页码"
  100. // @Param pagesize query int false "每页条数"
  101. // @Param userid query int true "用户id"
  102. // @Param marketid query int false "仓单贸易市场id"
  103. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  104. // @Success 200 {array} models.WrSpecialMatchOrder
  105. // @Failure 500 {object} app.Response
  106. // @Router /WrTrade2/QueryWrSpecialMatchOrder [get]
  107. // @Tags 仓单贸易v2
  108. func QueryWrSpecialMatchOrder(c *gin.Context) {
  109. a := app.GinUtils{Gin: app.Gin{C: c}}
  110. m := models.WrSpecialMatchOrder{}
  111. a.DoBindReq(&m)
  112. a.DoGetDataByPage(&m)
  113. }
  114. // QueryWrTradeDetail
  115. // @Summary 查询仓单成交明细
  116. // @Produce json
  117. // @Security ApiKeyAuth
  118. // @Param page query int false "页码"
  119. // @Param pagesize query int false "每页条数"
  120. // @Param userid query int true "用户id"
  121. // @Param marketid query int false "仓单贸易市场id"
  122. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  123. // @Success 200 {array} models.WrTradeDetail
  124. // @Failure 500 {object} app.Response
  125. // @Router /WrTrade2/QueryWrTradeDetail [get]
  126. // @Tags 仓单贸易v2
  127. func QueryWrTradeDetail(c *gin.Context) {
  128. a := app.GinUtils{Gin: app.Gin{C: c}}
  129. m := models.WrTradeDetail{}
  130. a.DoBindReq(&m)
  131. a.DoGetDataByPage(&m)
  132. }
  133. // QueryWrGoodsInfo
  134. // @Summary 查询仓单商品信息
  135. // @Produce json
  136. // @Security ApiKeyAuth
  137. // @Param marketid query int false "仓单贸易市场id"
  138. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  139. // @Param wrfactortypeid query int true "仓单要素id"
  140. // @Success 200 {array} models.WrGoodsInfo
  141. // @Failure 500 {object} app.Response
  142. // @Router /WrTrade2/QueryWrGoodsInfo [get]
  143. // @Tags 仓单贸易v2
  144. func QueryWrGoodsInfo(c *gin.Context) {
  145. a := app.GinUtils{Gin: app.Gin{C: c}}
  146. m := models.WrGoodsInfo{}
  147. a.DoBindReq(&m)
  148. a.DoGetDataI(&m)
  149. }
  150. // QueryPerformancePlan
  151. // @Summary 查询履约信息
  152. // @Produce json
  153. // @Security ApiKeyAuth
  154. // @Param userid query int true "用户id"
  155. // @Param buyorsell query int true "买卖方向 0-买 1-卖"
  156. // @Success 200 {array} models.WrPerformancePlan
  157. // @Failure 500 {object} app.Response
  158. // @Router /WrTrade2/QueryPerformancePlan [get]
  159. // @Tags 仓单贸易v2
  160. func QueryPerformancePlan(c *gin.Context) {
  161. a := app.GinUtils{Gin: app.Gin{C: c}}
  162. m := models.WrPerformancePlan{}
  163. a.DoBindReq(&m)
  164. a.DoGetDataI(&m)
  165. }
  166. // QueryHoldLB
  167. // @Summary 查询仓单持有记录
  168. // @Description 页面 现货仓单->现货明细? , 表名叫仓单持有记录, 有挂单特有维度,为防误解汇总也有相关维度, 新写接口,不跟汇总合在一起了。
  169. // @Produce json
  170. // @Security ApiKeyAuth
  171. // @Param accountid query int true "资金账号"
  172. // @Success 200 {array} models.WrHoldLB
  173. // @Failure 500 {object} app.Response
  174. // @Router /WrTrade2/QueryHoldLB [get]
  175. // @Tags 仓单贸易v2
  176. func QueryHoldLB(c *gin.Context) {
  177. a := app.GinUtils{Gin: app.Gin{C: c}}
  178. m := models.WrHoldLB{}
  179. a.DoBindReq(&m)
  180. a.DoGetDataI(&m)
  181. }
  182. // QueryFilterItem
  183. // @Summary 查询筛选框列表
  184. // @Produce json
  185. // @Security ApiKeyAuth
  186. // @Param itype query string true "类型(可多选,逗号隔开) 1-品种 2-品类(商品) 3-仓库"
  187. // @Success 200 {array} models.WrFilterItem
  188. // @Failure 500 {object} app.Response
  189. // @Router /WrTrade2/QueryFilterItem [get]
  190. // @Tags 仓单贸易v2
  191. func QueryFilterItem(c *gin.Context) {
  192. a := app.GinUtils{Gin: app.Gin{C: c}}
  193. m := models.WrFilterItem{}
  194. a.DoBindReq(&m)
  195. a.DoGetDataI(&m)
  196. }
  197. // QueryFaProductDetail
  198. // @Summary 查询融资产品列表
  199. // @Description 页面 买卖大厅 -> 选择融资方案
  200. // @Produce json
  201. // @Security ApiKeyAuth
  202. // @Param wrfactortypeid query int true "仓单要素id"
  203. // @Success 200 {array} models.WrFAProductDetail
  204. // @Failure 500 {object} app.Response
  205. // @Router /WrTrade2/QueryFaProductDetail [get]
  206. // @Tags 仓单贸易v2
  207. func QueryFaProductDetail(c *gin.Context) {
  208. a := app.GinUtils{Gin: app.Gin{C: c}}
  209. m := models.WrFAProductDetail{}
  210. a.DoBindReq(&m)
  211. a.DoGetDataI(&m)
  212. }
  213. // QueryWrFactorTypeInfo
  214. // @Summary 查询仓单要素详细信息
  215. // @Produce json
  216. // @Security ApiKeyAuth
  217. // @Param wrfactortypeid query int true "仓单要素id"
  218. // @Success 200 {array} models.WrFactorTypeInfo
  219. // @Failure 500 {object} app.Response
  220. // @Router /WrTrade2/QueryWrFactorTypeInfo [get]
  221. // @Tags 仓单贸易v2
  222. func QueryWrFactorTypeInfo(c *gin.Context) {
  223. a := app.GinUtils{Gin: app.Gin{C: c}}
  224. m := models.WrFactorTypeInfo{}
  225. a.DoBindReq(&m)
  226. a.DoGetDataI(&m)
  227. }