package controller import ( "github.com/gin-gonic/gin" "youngee_b_api/app/service" ) type WorkspaceController struct{} type GetTakegoodsInfoParam struct { EnterpriseId string `json:"enterprise_id"` DateRange string `json:"days"` } func (w WorkspaceController) GetTakegoodsInfo(c *gin.Context) { search := &GetTakegoodsInfoParam{} err := c.BindJSON(&search) if err != nil { returnError(c, 40000, "error") return } result := service.EnterpriseService{}.GetEnterpriseTakegoodsInfo(search.EnterpriseId, search.DateRange) returnSuccess(c, 20000, result) }