myposition.go 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. package mine
  2. import (
  3. "mtp2_if/global/app"
  4. "mtp2_if/models"
  5. "github.com/gin-gonic/gin"
  6. )
  7. // QueryMineCpTradePreSaleResults
  8. // @Summary 我的持仓-预售持仓
  9. // @Produce json
  10. // @Security ApiKeyAuth
  11. // @Param userid query int true "用户ID"
  12. // @Param page query int false "页码"
  13. // @Param pagesize query int false "每页条数"
  14. // @Success 200 {array} models.MineCpTradePreSaleResult
  15. // @Failure 500 {object} app.Response
  16. // @Router /Mine/QueryMineCpTradePreSaleResults [get]
  17. // @Tags 我的
  18. func QueryMineCpTradePreSaleResults(c *gin.Context) {
  19. a := app.GinUtils{Gin: app.Gin{C: c}}
  20. m := models.MineCpTradePreSaleResult{}
  21. a.DoBindReq(&m)
  22. a.DoGetDataByPage(&m)
  23. }
  24. // QueryMineTradePositionExs
  25. // @Summary 我的持仓-转让持仓
  26. // @Produce json
  27. // @Security ApiKeyAuth
  28. // @Param userid query int true "用户ID"
  29. // @Param goodsid query int false "商品ID"
  30. // @Param page query int false "页码"
  31. // @Param pagesize query int false "每页条数"
  32. // @Success 200 {array} models.MineTradePositionEx
  33. // @Failure 500 {object} app.Response
  34. // @Router /Mine/QueryMineTradePositionExs [get]
  35. // @Tags 我的
  36. func QueryMineTradePositionExs(c *gin.Context) {
  37. a := app.GinUtils{Gin: app.Gin{C: c}}
  38. m := models.MineTradePositionEx{}
  39. a.DoBindReq(&m)
  40. a.DoGetDataByPage(&m)
  41. }
  42. // QueryMineTradeOrderDetails
  43. // @Summary 我的订单-预售认购
  44. // @Produce json
  45. // @Security ApiKeyAuth
  46. // @Param userid query int true "用户ID"
  47. // @Param page query int false "页码"
  48. // @Param pagesize query int false "每页条数"
  49. // @Param ishis query bool false "是否历史查询"
  50. // @Param begindate query string false "开始交易日(yyyymmdd)"
  51. // @Param enddate query string false "结束交易日(yyyymmdd)"
  52. // @Success 200 {array} models.MineTradeOrderDetail
  53. // @Failure 500 {object} app.Response
  54. // @Router /Mine/QueryMineTradeOrderDetails [get]
  55. // @Tags 我的
  56. func QueryMineTradeOrderDetails(c *gin.Context) {
  57. a := app.GinUtils{Gin: app.Gin{C: c}}
  58. m := models.MineTradeOrderDetail{}
  59. a.DoBindReq(&m)
  60. a.DoGetDataByPage(&m)
  61. }
  62. // QueryMineTradeOrders
  63. // @Summary 我的订单-转让委托
  64. // @Produce json
  65. // @Security ApiKeyAuth
  66. // @Param userid query int true "用户ID"
  67. // @Param status query string false "委托状态 - 格式:1,2,3"
  68. // @Param page query int false "页码"
  69. // @Param pagesize query int false "每页条数"
  70. // @Param ishis query bool false "是否历史查询"
  71. // @Param begindate query string false "开始交易日(yyyymmdd)"
  72. // @Param enddate query string false "结束交易日(yyyymmdd)"
  73. // @Success 200 {array} models.MineTradeOrder
  74. // @Failure 500 {object} app.Response
  75. // @Router /Mine/QueryMineTradeOrders [get]
  76. // @Tags 我的
  77. func QueryMineTradeOrders(c *gin.Context) {
  78. a := app.GinUtils{Gin: app.Gin{C: c}}
  79. m := models.MineTradeOrder{}
  80. a.DoBindReq(&m)
  81. a.DoGetDataByPage(&m)
  82. }
  83. // QueryMineTradeTradeDetails
  84. // @Summary 我的订单-转让成交
  85. // @Produce json
  86. // @Security ApiKeyAuth
  87. // @Param userid query int true "用户ID"
  88. // @Param page query int false "页码"
  89. // @Param pagesize query int false "每页条数"
  90. // @Param ishis query bool false "是否历史查询"
  91. // @Param begindate query string false "开始交易日(yyyymmdd)"
  92. // @Param enddate query string false "结束交易日(yyyymmdd)"
  93. // @Success 200 {array} models.MineTradeTradeDetail
  94. // @Failure 500 {object} app.Response
  95. // @Router /Mine/QueryMineTradeTradeDetails [get]
  96. // @Tags 我的
  97. func QueryMineTradeTradeDetails(c *gin.Context) {
  98. a := app.GinUtils{Gin: app.Gin{C: c}}
  99. m := models.MineTradeTradeDetail{}
  100. a.DoBindReq(&m)
  101. a.DoGetDataByPage(&m)
  102. }
  103. // QueryMineTradeGoodsDeliveryOfflines
  104. // @Summary 交收提货-线下交收单
  105. // @Produce json
  106. // @Security ApiKeyAuth
  107. // @Param userid query int true "用户ID"
  108. // @Param buyorsell query int false "交收方向 - 0:买 1:卖,不过滤方法不要传此参数"
  109. // @Param marketids query int false "目标市场ID列表,格式 1,2,3"
  110. // @Param page query int false "页码"
  111. // @Param pagesize query int false "每页条数"
  112. // @Success 200 {array} models.MineTradeGoodsDeliveryOffline
  113. // @Failure 500 {object} app.Response
  114. // @Router /Mine/QueryMineTradeGoodsDeliveryOfflines [get]
  115. // @Tags 我的
  116. func QueryMineTradeGoodsDeliveryOfflines(c *gin.Context) {
  117. a := app.GinUtils{Gin: app.Gin{C: c}}
  118. m := models.MineTradeGoodsDeliveryOffline{}
  119. a.DoBindReq(&m)
  120. a.DoGetDataByPage(&m)
  121. }