qryWarehouse.go 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. )
  12. // QryWarehouseReq 仓库查询请求参数
  13. type QryWarehouseReq struct {
  14. UserId int64 `form:"userid" binding:"required"` //用户ID
  15. Status string `form:"status"` // 仓库状态(可多项,逗号隔开) 1:正常 2:注销 3:待审核 4:审核拒绝
  16. }
  17. // QryWarehouseRsp 仓库查询响应
  18. type QryWarehouseRsp models.ErmcpWareHouseInfo
  19. // QryWarehouseInfo
  20. // @Summary 查询仓库信息
  21. // @Produce json
  22. // @Security ApiKeyAuth
  23. // @Param userid query int true "用户ID"
  24. // @Param status query string false "仓库状态(可多项,逗号隔开) 1:正常 2:注销 3:待审核 4:审核拒绝"
  25. // @Success 200 {array} QryWarehouseRsp
  26. // @Failure 500 {object} app.Response
  27. // @Router /Ermcp/QueryWarehouseInfo [get]
  28. // @Tags 企业风险管理(app)
  29. func QueryWarehouseInfo(c *gin.Context) {
  30. a := app.NewGinUtils(c)
  31. req := QryWarehouseReq{}
  32. a.DoBindReq(&req)
  33. m := models.ErmcpWareHouseInfo{AREAUSERID: req.UserId, FilterStatus: req.Status}
  34. a.DoGetDataEx(&m)
  35. }