qrySpotGoodsPrice.go 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /**
  2. * @Author: zou.yingbin
  3. * @Create : 2021/4/12 10:39
  4. * @Modify : 2021/4/12 10:39
  5. */
  6. package ermcp
  7. import (
  8. "github.com/gin-gonic/gin"
  9. "mtp2_if/global/app"
  10. "mtp2_if/models"
  11. )
  12. // QuerySpotGoodsPrice
  13. // @Summary 查询现货市价(现货市价)
  14. // @Produce json
  15. // @Security ApiKeyAuth
  16. // @Param userid query int true "用户ID"
  17. // @Success 200 {array} models.ErmcpSpotGoodsPrice
  18. // @Failure 500 {object} app.Response
  19. // @Router /Ermcp/QuerySpotGoodsPrice [get]
  20. // @Tags 企业风险管理(app)
  21. func QuerySpotGoodsPrice(c *gin.Context) {
  22. req := struct {
  23. UserId int64 `form:"userid" binding:"required"` // 用户id
  24. }{}
  25. a := app.GinUtils{Gin: app.Gin{C: c}}
  26. a.DoBindReq(&req)
  27. m := models.ErmcpSpotGoodsPrice{AREAUSERID: req.UserId}
  28. a.DoGetDataI(&m)
  29. }
  30. // QuerySpotGoodsPriceLog
  31. // @Summary 查询现货市价详情(现货市价/详情)
  32. // @Produce json
  33. // @Security ApiKeyAuth
  34. // @Param userid query int true "用户ID"
  35. // @Param wrstandardid query int true "现货商品ID"
  36. // @Success 200 {array} models.ErmcpSpotGoodsPriceLog
  37. // @Failure 500 {object} app.Response
  38. // @Router /Ermcp/QuerySpotGoodsPriceLog [get]
  39. // @Tags 企业风险管理(app)
  40. func QuerySpotGoodsPriceLog(c *gin.Context) {
  41. req := struct {
  42. UserId int64 `form:"userid" binding:"required"` // 用户id
  43. Wrstandardid int64 `form:"wrstandardid" binding:"required"` // 现货商品id
  44. }{}
  45. a := app.GinUtils{Gin: app.Gin{C: c}}
  46. a.DoBindReq(&req)
  47. m := models.ErmcpSpotGoodsPriceLog{AREAUSERID: req.UserId, WRSTANDARDID: req.Wrstandardid}
  48. a.DoGetDataI(&m)
  49. }