package datacenter import ( "net/http" "GtDataStore/app/cmd/api/internal/logic/datacenter" "GtDataStore/app/cmd/api/internal/svc" "GtDataStore/app/cmd/api/internal/types" "github.com/zeromicro/go-zero/rest/httpx" ) func ItemHistoryDataInfoHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { var req types.ItemHistoryDataByTimeResq if err := httpx.Parse(r, &req); err != nil { httpx.ErrorCtx(r.Context(), w, err) return } l := datacenter.NewItemHistoryDataInfoLogic(r.Context(), svcCtx) resp, err := l.ItemHistoryDataInfo(&req) if err != nil { httpx.ErrorCtx(r.Context(), w, err) } else { httpx.OkJsonCtx(r.Context(), w, resp) } } }