qryWrTrade.go 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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-有(仓单贸易填1,产能预售填0)"
  21. // @Param wrstandardname query string false "商品名称(筛选条件)"
  22. // @Param brandname query string false "品牌名称(筛选条件)"
  23. // @Param warehouseid query int false "仓库id(筛选条件)"
  24. // @Success 200 {array} models.WrOrderQuote
  25. // @Failure 500 {object} app.Response
  26. // @Router /WrTrade2/QueryOrderQuote [get]
  27. // @Tags 仓单贸易v2
  28. func QueryOrderQuote(c *gin.Context) {
  29. a := app.GinUtils{Gin: app.Gin{C: c}}
  30. m := models.WrOrderQuote{}
  31. a.DoBindReq(&m)
  32. a.DoGetDataByPage(&m)
  33. }
  34. // QueryOrderQuote
  35. // @Summary 查询买卖大厅
  36. // @Produce json
  37. // @Security ApiKeyAuth
  38. // @Param page query int false "页码"
  39. // @Param pagesize query int false "每页条数"
  40. // @Param marketid query int false "仓单贸易市场id"
  41. // @Param wrpricetype query int true "价格方式 - 1:固定价 2-浮动价"
  42. // @Param haswr query int true "是否有仓单 0-没有 1-有(仓单贸易填1,仓单预售填0)"
  43. // @Param wrfactortypeid query int true "仓单要素id"
  44. // @Param goodsid query int true "期货商品id"
  45. // @Param buyorsell query int true "买卖方向 0-买 1-卖"
  46. // @Success 200 {array} models.WrOrderQuoteDetail
  47. // @Failure 500 {object} app.Response
  48. // @Router /WrTrade2/QueryOrderQuoteDetail [get]
  49. // @Tags 仓单贸易v2
  50. func QueryOrderQuoteDetail(c *gin.Context) {
  51. a := app.GinUtils{Gin: app.Gin{C: c}}
  52. m := models.WrOrderQuoteDetail{}
  53. a.DoBindReq(&m)
  54. a.DoGetDataByPage(&m)
  55. }
  56. // QueryWrPosition
  57. // @Summary 查询现货(预售)仓单持仓
  58. // @Description 页面 现货仓单->现货汇总/库存汇总/现货明细 ; 预售仓单->订单汇总
  59. // @Produce json
  60. // @Security ApiKeyAuth
  61. // @Param userid query int true "用户id"
  62. // @Param querytype query int true "查询类型 1-现货汇总 2-库存汇总(订单汇总) 3-现货明细"
  63. // @Success 200 {array} models.WrPosition
  64. // @Failure 500 {object} app.Response
  65. // @Router /WrTrade2/QueryWrPosition [get]
  66. // @Tags 仓单贸易v2
  67. func QueryWrPosition(c *gin.Context) {
  68. a := app.GinUtils{Gin: app.Gin{C: c}}
  69. m := models.WrPosition{}
  70. a.DoBindReq(&m)
  71. a.DoGetDataI(&m)
  72. }
  73. // QueryWrOrderDetail
  74. // @Summary 查询仓单委托单(挂单)
  75. // @Description 页面 现货仓单 | 预售仓单 -> 挂单
  76. // @Produce json
  77. // @Security ApiKeyAuth
  78. // @Param page query int false "页码"
  79. // @Param pagesize query int false "每页条数"
  80. // @Param userid query int true "用户id"
  81. // @Param marketid query int false "仓单贸易市场id"
  82. // @Param haswr query int true "是否有仓单 0-没有 1-有(仓单贸易填1,仓单预售填0)"
  83. // @Success 200 {array} models.WrOrderDetail
  84. // @Failure 500 {object} app.Response
  85. // @Router /WrTrade2/QueryWrOrderDetail [get]
  86. // @Tags 仓单贸易v2
  87. func QueryWrOrderDetail(c *gin.Context) {
  88. a := app.GinUtils{Gin: app.Gin{C: c}}
  89. m := models.WrOrderDetail{}
  90. a.DoBindReq(&m)
  91. a.DoGetDataByPage(&m)
  92. }
  93. // QueryWrTradeDetail
  94. // @Summary 查询仓单成交明细
  95. // @Produce json
  96. // @Security ApiKeyAuth
  97. // @Param page query int false "页码"
  98. // @Param pagesize query int false "每页条数"
  99. // @Param userid query int true "用户id"
  100. // @Param marketid query int false "仓单贸易市场id"
  101. // @Param haswr query int true "是否有仓单 0-没有 1-有(仓单贸易填1,仓单预售填0)"
  102. // @Success 200 {array} models.WrTradeDetail
  103. // @Failure 500 {object} app.Response
  104. // @Router /WrTrade2/QueryWrTradeDetail [get]
  105. // @Tags 仓单贸易v2
  106. func QueryWrTradeDetail(c *gin.Context) {
  107. a := app.GinUtils{Gin: app.Gin{C: c}}
  108. m := models.WrTradeDetail{}
  109. a.DoBindReq(&m)
  110. a.DoGetDataByPage(&m)
  111. }