trade.go 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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 page query int false "页码"
  49. // @Param pagesize query int false "每页条数"
  50. // @Success 200 {array} models.Thjpurchasetransfer
  51. // @Failure 500 {object} app.Response
  52. // @Router /Ferroalloy/QueryTHJPurchaseTransferOrder [get]
  53. // @Tags 铁合金
  54. func QueryTHJPurchaseTransferOrder(c *gin.Context) {
  55. a := app.GinUtils{Gin: app.Gin{C: c}}
  56. m := models.Thjpurchasetransfer{}
  57. a.DoBindReq(&m)
  58. a.DoGetDataByPage(&m)
  59. }
  60. // QueryTHJPromotionIncome
  61. // @Summary 查询我的推广-推广收益
  62. // @Produce json
  63. // @Security ApiKeyAuth
  64. // @Param userid query int true "用户ID"
  65. // @Param profitstatus query int false "状态 - 0:全部 1:已支付 2:未支付"
  66. // @Param page query int false "页码"
  67. // @Param pagesize query int false "每页条数"
  68. // @Success 200 {array} models.PromotionIncome
  69. // @Failure 500 {object} app.Response
  70. // @Router /Ferroalloy/QueryTHJPromotionIncome [get]
  71. // @Tags 铁合金
  72. func QueryTHJPromotionIncome(c *gin.Context) {
  73. a := app.GinUtils{Gin: app.Gin{C: c}}
  74. m := models.PromotionIncome{}
  75. a.DoBindReq(&m)
  76. a.DoGetDataByPage(&m)
  77. }
  78. // QueryTHJPromotionIncomeDetail
  79. // @Summary 查询我的推广-推广收益-明细
  80. // @Produce json
  81. // @Security ApiKeyAuth
  82. // @Param userid query int true "用户ID"
  83. // @Param mouth query string true "月份,格式:yyyymm"
  84. // @Param page query int false "页码"
  85. // @Param pagesize query int false "每页条数"
  86. // @Success 200 {array} models.PromotionIncomeDetail
  87. // @Failure 500 {object} app.Response
  88. // @Router /Ferroalloy/QueryTHJPromotionIncomeDetail [get]
  89. // @Tags 铁合金
  90. func QueryTHJPromotionIncomeDetail(c *gin.Context) {
  91. a := app.GinUtils{Gin: app.Gin{C: c}}
  92. m := models.PromotionIncomeDetail{}
  93. a.DoBindReq(&m)
  94. a.DoGetDataByPage(&m)
  95. }