qryBrandModel.go 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /**
  2. * @Author: zou.yingbin
  3. * @Create : 2021/3/15 10:41
  4. * @Modify : 2021/3/15 10:41
  5. */
  6. package ermcp
  7. import (
  8. "github.com/gin-gonic/gin"
  9. "mtp2_if/global/app"
  10. "mtp2_if/models"
  11. )
  12. // QueryBrandModelReq 查询品牌和型号请求
  13. type QueryBrandModelReq struct {
  14. UserId int64 `form:"userid" binding:"required"` // 用户ID
  15. }
  16. // QueryGoodsBrand
  17. // @Summary 查询商品品牌
  18. // @Produce json
  19. // @Security ApiKeyAuth
  20. // @Param userid query int true "用户ID"
  21. // @Success 200 {array} models.ErmcpGoodsBrand
  22. // @Failure 500 {object} app.Response
  23. // @Router /Ermcp/QueryGoodsBrand [get]
  24. // @Tags 企业风险管理(app)
  25. func QueryGoodsBrand(c *gin.Context) {
  26. a := app.GinUtils{Gin: app.Gin{C: c}}
  27. req := QueryBrandModelReq{}
  28. a.DoBindReq(&req)
  29. m := models.ErmcpGoodsBrand{AREAUSERID: req.UserId}
  30. a.DoGetDataEx(&m)
  31. }
  32. // QueryGoodsModel
  33. // @Summary 查询商品型号
  34. // @Produce json
  35. // @Security ApiKeyAuth
  36. // @Param userid query int true "用户ID"
  37. // @Success 200 {array} models.ErmcpGoodsModel
  38. // @Failure 500 {object} app.Response
  39. // @Router /Ermcp/QueryGoodsModel [get]
  40. // @Tags 企业风险管理(app)
  41. func QueryGoodsModel(c *gin.Context) {
  42. a := app.GinUtils{Gin: app.Gin{C: c}}
  43. req := QueryBrandModelReq{}
  44. a.DoBindReq(&req)
  45. m := models.ErmcpGoodsModel{AREAUSERID: req.UserId}
  46. a.DoGetDataEx(&m)
  47. }