qryWarehouse.go 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. "github.com/gin-gonic/gin"
  9. "mtp2_if/global/app"
  10. "mtp2_if/models"
  11. "mtp2_if/mtpcache"
  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. }
  18. // QryWarehouseRsp 仓库查询响应
  19. type QryWarehouseRsp models.ErmcpWareHouseInfo
  20. // QryWarehouseInfo
  21. // @Summary 查询仓库信息
  22. // @Produce json
  23. // @Security ApiKeyAuth
  24. // @Param userid query int true "用户ID"
  25. // @Param status query string false "仓库状态(可多项,逗号隔开) 1:正常 2:注销 3:待审核 4:审核拒绝"
  26. // @Success 200 {array} QryWarehouseRsp
  27. // @Failure 500 {object} app.Response
  28. // @Router /Ermcp/QueryWarehouseInfo [get]
  29. // @Tags 企业风险管理(app)
  30. func QueryWarehouseInfo(c *gin.Context) {
  31. a := app.NewGinUtils(c)
  32. req := QryWarehouseReq{}
  33. a.DoBindReq(&req)
  34. m := models.ErmcpWareHouseInfo{AREAUSERID: mtpcache.GetAreaUserId(req.UserId, 0),
  35. FilterStatus: req.Status}
  36. a.DoGetDataI(&m)
  37. }