qryWarehouse.go 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /**
  2. * @Author: zou.yingbin
  3. * @Create : 2021/3/10 15:04
  4. * @Modify : 2021/3/10 15:04
  5. */
  6. package ermcp
  7. import (
  8. "mtp2_if/global/app"
  9. "mtp2_if/models"
  10. "mtp2_if/mtpcache"
  11. "github.com/gin-gonic/gin"
  12. )
  13. // QryWarehouseReq 仓库查询请求参数
  14. type QryWarehouseReq struct {
  15. UserId int64 `form:"userid" binding:"required"` //用户ID
  16. Status string `form:"status"` // 仓库状态(可多项,逗号隔开) 1:正常 2:注销 3:待审核 4:审核拒绝
  17. IsIncludeExchange bool `form:"isincludeexchange"` // 是返回交易所仓库
  18. }
  19. // QryWarehouseRsp 仓库查询响应
  20. type QryWarehouseRsp models.ErmcpWareHouseInfo
  21. // QryWarehouseInfo
  22. // @Summary 查询仓库信息
  23. // @Produce json
  24. // @Security ApiKeyAuth
  25. // @Param userid query int true "用户ID"
  26. // @Param status query string false "仓库状态(可多项,逗号隔开) 1:正常 2:注销 3:待审核 4:审核拒绝"
  27. // @Success 200 {array} QryWarehouseRsp
  28. // @Failure 500 {object} app.Response
  29. // @Router /Ermcp/QueryWarehouseInfo [get]
  30. // @Tags 企业风险管理(app)
  31. func QueryWarehouseInfo(c *gin.Context) {
  32. a := app.NewGinUtils(c)
  33. req := QryWarehouseReq{}
  34. a.DoBindReq(&req)
  35. m := models.ErmcpWareHouseInfo{AREAUSERID: mtpcache.GetAreaUserId(req.UserId, 0),
  36. FilterStatus: req.Status}
  37. a.DoGetDataI(&m)
  38. }