trade.go 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. package ferroalloy
  2. import (
  3. "mtp2_if/global/app"
  4. "mtp2_if/models"
  5. "github.com/gin-gonic/gin"
  6. )
  7. // QueryTHJPurchaseTradeDetail
  8. // @Summary 查询我的订单-采购订单
  9. // @Produce json
  10. // @Security ApiKeyAuth
  11. // @Param userid query int true "用户ID"
  12. // @Param type query int false "类型 - 0:未完成 1:已完成"
  13. // @Param page query int false "页码"
  14. // @Param pagesize query int false "每页条数"
  15. // @Success 200 {array} models.Thjpurchasetradedetail
  16. // @Failure 500 {object} app.Response
  17. // @Router /Ferroalloy/QueryTHJPurchaseTradeDetail [get]
  18. // @Tags 铁合金
  19. func QueryTHJPurchaseTradeDetail(c *gin.Context) {
  20. a := app.GinUtils{Gin: app.Gin{C: c}}
  21. m := models.Thjpurchasetradedetail{}
  22. a.DoBindReq(&m)
  23. a.DoGetDataByPage(&m)
  24. }
  25. // QueryTHJTradeData
  26. // @Summary 获取我的推广-交易数据
  27. // @Produce json
  28. // @Security ApiKeyAuth
  29. // @Param userid query int true "用户ID"
  30. // @Param marketid query int true "市场ID 采购-64201 供求-65201"
  31. // @Param page query int false "页码"
  32. // @Param pagesize query int false "每页条数"
  33. // @Success 200 {array} models.THJTradeData
  34. // @Failure 500 {object} app.Response
  35. // @Router /Ferroalloy/QueryTHJTradeData [get]
  36. // @Tags 铁合金
  37. func QueryTHJTradeData(c *gin.Context) {
  38. a := app.GinUtils{Gin: app.Gin{C: c}}
  39. m := models.THJTradeData{}
  40. a.DoBindReq(&m)
  41. a.DoGetDataByPage(&m)
  42. }
  43. // QueryTHJPurchaseTransferOrder
  44. // @Summary 查询我的订单-转让/受让订单
  45. // @Produce json
  46. // @Security ApiKeyAuth
  47. // @Param userid query int true "用户ID"
  48. // @Param ordertype query int true "类型 - 1:转让 2:受让"
  49. // @Param page query int false "页码"
  50. // @Param pagesize query int false "每页条数"
  51. // @Success 200 {array} models.Thjpurchasetransfer
  52. // @Failure 500 {object} app.Response
  53. // @Router /Ferroalloy/QueryTHJPurchaseTransferOrder [get]
  54. // @Tags 铁合金
  55. func QueryTHJPurchaseTransferOrder(c *gin.Context) {
  56. a := app.GinUtils{Gin: app.Gin{C: c}}
  57. m := models.Thjpurchasetransfer{}
  58. a.DoBindReq(&m)
  59. a.DoGetDataByPage(&m)
  60. }
  61. // QueryTHJPromotionIncome
  62. // @Summary 查询我的推广-推广收益
  63. // @Produce json
  64. // @Security ApiKeyAuth
  65. // @Param userid query int true "用户ID"
  66. // @Param profitstatus query int false "状态 - 0:全部 1:已支付 2:未支付"
  67. // @Param page query int false "页码"
  68. // @Param pagesize query int false "每页条数"
  69. // @Success 200 {array} models.PromotionIncome
  70. // @Failure 500 {object} app.Response
  71. // @Router /Ferroalloy/QueryTHJPromotionIncome [get]
  72. // @Tags 铁合金
  73. func QueryTHJPromotionIncome(c *gin.Context) {
  74. a := app.GinUtils{Gin: app.Gin{C: c}}
  75. m := models.PromotionIncome{}
  76. a.DoBindReq(&m)
  77. a.DoGetDataByPage(&m)
  78. }
  79. // QueryTHJPromotionIncomeDetail
  80. // @Summary 查询我的推广-推广收益-明细
  81. // @Produce json
  82. // @Security ApiKeyAuth
  83. // @Param userid query int true "用户ID"
  84. // @Param mouth query string true "月份,格式:yyyymm"
  85. // @Param page query int false "页码"
  86. // @Param pagesize query int false "每页条数"
  87. // @Success 200 {array} models.PromotionIncomeDetail
  88. // @Failure 500 {object} app.Response
  89. // @Router /Ferroalloy/QueryTHJPromotionIncomeDetail [get]
  90. // @Tags 铁合金
  91. func QueryTHJPromotionIncomeDetail(c *gin.Context) {
  92. a := app.GinUtils{Gin: app.Gin{C: c}}
  93. m := models.PromotionIncomeDetail{}
  94. a.DoBindReq(&m)
  95. a.DoGetDataByPage(&m)
  96. }